Im trying the following to bring up a view that only has 6 product nodes, and I get a WSOD with a Memory Exhausted warning, ive set it to 256MB, it shouldnt be flaking out on such a small request!

$view = views_get_view('products');
$response = $view->preview('block');

Am i doing something wrong?

1 Answer 1


Views is notoriously heavy with memory, but it does seem odd that a view that only touches 6 nodes would crap out at 256 MB.

I see you've got a dpm call there - does removing that and turning off the devel module make a difference? And do you have xdebug enabled or any other profiling enabled by any chance? All that stuff would contribute.

The other thing you might want to double check from phpinfo() is to see if your memory limit really is set to 256MB.

  • Yeah i figured that. Somethings going wrong - tried doing what you said, but in the end went about things a different way. Thanks for your help.
    – Collins
    Commented Jun 1, 2017 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.