Internal Server Error On Products List

I have a database with many products (about 80'000) and when I select a filter on a main category, it breaks and returns an internal server error.

As it does not happend in subcategories, I think it's because of the amount of products.

Do I have to modifiy somehting on server side to let cs-cart work ?

PS: For information, here's the log of the error :

[Mon Mar 27 11:22:33.727148 2017] [:error] [pid 25616] [client] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 17565907 bytes) in /home/DOMAIN/preprod/www/app/Tygh/SmartyEngine/Filters.php on line 356, referer: http://DOMAIN/
[Mon Mar 27 11:23:00.006101 2017] [:error] [pid 25587] [client] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 17611873 bytes) in /home/DOMAIN/preprod/www/app/Tygh/SmartyEngine/Filters.php on line 356, referer: http://DOMAIN/dvd-blu-ray/

Increase PHP memory to 512mb.

In the config.local.php add

@ini_set('memory_limit', '1024M');


if (!defined('CONSOLE')) {

Thanks guy.

It works.

What is this value ? What does it do by increasing it ? If it's so simple, why isn't it just at 1024M by default ?

It is a maximum value. For a small store, it would be lower. If it triggers, it is usually a sign that something has gone awry. Hence setting it to a large value by default may mask a problem. It should be set appropriate to the site. The vast majority of sites can run with memory_limit < 256M easily.

Same problem in 4.2.1

/ Log everything, but do not display
ini_set('display_errors', 0);

// Set maximum memory limit
if (PHP_INT_SIZE == 4 && (substr(ini_get(‘memory_limit’), 0, -1) < “64”)) {
// 32bit PHP
@ini_set(‘memory_limit’, ‘128M’);
} elseif (PHP_INT_SIZE == 8 && (substr(ini_get(‘memory_limit’), 0, -1) < “256”)) {
// 64bit PHP
@ini_set(‘memory_limit’, ‘512M’);

// Set maximum time limit for script execution

Where we must to change ?!

In most environments, change the "256" to something larger. Use powers-of-two and increment it until it doesn't throw your error. I.e. 512, 1024, 2048, 4096. Only a very small percentage of cs-cart installations would ever need to go beyond 4096 (4GB).

Thanks a lot

Really works