Website consuming more memory I have nearly 150 Panel pages and different template files. I generated lot of blocks using Node Block module to be used in the Panel pages. 

I guess this is causing memory issues in both MySQL and Apache configuration. Any solution for this memory issues?

My global memory_limit is 128M. Only after setting 512M in settings.php, my custom Drupal View is generating the output (otherwise, it generated a 502 error).

Is there a way so that I can set memory_limit only for my custom View?
Refer to the Changing PHP memory limits document, you can use 

ini_set('memory_limit', '64M');


which should be in your settings.php file.