Service Unavailable Error

Hi all,

I have been working fine with my install of CS Cart (v4.5.2) and I have noticed one product category now displays this error in the frontend: "Sorry, service is temporarily unavailable."

I'm sure why it is doing this, but the rest of the website is functioning without any issues. It seems to only be this one category. I have noticed in the admin backend, I can't make any changes to this category and everything seems to be displayed really odd as well. Has something become corrupted?

Any advice would be appreciated :?

Hi all,

I have been working fine with my install of CS Cart (v4.5.2) and I have noticed one product category now displays this error in the frontend: "Sorry, service is temporarily unavailable."

I'm sure why it is doing this, but the rest of the website is functioning without any issues. It seems to only be this one category. I have noticed in the admin backend, I can't make any changes to this category and everything seems to be displayed really odd as well. Has something become corrupted?

Any advice would be appreciated :?

Please check the error message in the source code of the Service Unavailable page (Ctrl+U)

Actually, using ctl-U will cause the page to be reloaded which might then not show the error. Strongly suggest you right-click the page and then 'inspect' to view the source of that instance of the page.

Or just enable error displaying. In the config.local.php file replace

ini_set('display_errors', 0);

with

ini_set('display_errors', 1);
define('DEVELOPMENT', true);

Please check the error message in the source code of the Service Unavailable page (Ctrl+U)

Thank you for your reply. I have done this and found this at the bottom of the source code:

PHP Fatal Error
Message
Allowed memory size of 134217728 bytes exhausted (tried to allocate 44847600 bytes)
Error at
C:\xampp\htdocs\dds\app\lib\vendor\imagine\imagine\lib\Imagine\Gd\Imagine.php, line: 93
Backtrace
-->

Any advice would be appreciated

You need to increase memory limit. Ask your server admin.

It is running on a local computer currently.

I have changed the following in the config.local.php file: @ini_set('memory_limit', '256M');

I have changed it to: @ini_set('memory_limit', '512M');

However, I am still getting the same error message. I feel I may have missed a step? :-(

Thank you for your reply. I have done this and found this at the bottom of the source code:

PHP Fatal Error
Message
Allowed memory size of 134217728 bytes exhausted (tried to allocate 44847600 bytes)
Error at
C:\xampp\htdocs\dds\app\lib\vendor\imagine\imagine\lib\Imagine\Gd\Imagine.php, line: 93
Backtrace
-->

Any advice would be appreciated

The issue appears because of too big images that are uploaded to the store. The GD library on your server fails to generate the thumbnails because of the lack of memory.

You can try increasing the memory_limit value to some greater value (for example 2048M). Thumbnails should be generated in this case. After that we recommend to upload optimized images instead of the ones that cause this issue.

Your setup isn't accepting the memory limit set in config.local.php so you need to change it via the php.ini file.

Changing it in the php.ini file worked instantly! Thanks!

-