Jump to content

Regenerating Thumbnails Error on VPS


Recommended Posts

Hi Everyone,

 

I am in the process of moving a site from shared hosting onto a VPS and I have got to the point where I am trying to regenerate the thumbnails.  This is where I get the following error.

 

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2016 bytes) in /home/c4school/public_html/classes/ImageManager.php on line 365

 

This is what I have done so far.

 

  • I have done a fresh install of version 1.5.4.1 (this is the version installed on the shared server)
  • then I have taken a backup of the database from the original site on the shared server and have imported that into the database.  
  • I have copied my theme folder over
  • I have then copied the img directory over to the VPS
  • I have recreated the .htaccess file
  • I have modified the php.ini to have the below settings
  • I have checked using phpinfo() the settings are being used - they are
  • I have set the permissions on the img directory and subdirectories to 777

php.ini settings:

 

memory_limit = 64M
max_execution_time = 1000;
max_input_time = -1;
post_max_size = 20M;
upload_max_filesize = 20M;
max_input_vars = 10000;
suhosin.get.max_vars = 10000;
suhosin.post.max_vars = 10000;

 

Still I get the above error no matter how i try and regenerate the images.

 

As this is a VPS I have full control over the settings so if anyone has any ideas what I can change to try and get this work I'd be most appreciative.

 

Many thanks.

 

 

 
Link to comment
Share on other sites

Such a memory_limit is a bit low for PrestaShop

33554432 bytes represents only 32M (I recommend 384M on 1.5)

So:

a/ your php.ini params seems not to be considered

b/ try some little thumbnails (the small for instance), but I am suspecting it will fail either

c/ Error / abortion is normal behaviour during this process. To continue further simply rerun the operation without the erase option

Link to comment
Share on other sites

Hi Doekia,

 

I have changed the memory setting in the php.ini file to.

 

memory_limit = 400M

 

If you look at the following page it looks like the setting is being considered...

 

http://212.67.219.185/~c4school/phpinfo.php

 

I have just tried to regenerate the small_default images for the products again but the error below is returned immediately 

 

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2016 bytes) in /home/c4school/public_html/classes/ImageManager.php on line 365

 

Do you have any other ideas?

 

Many thanks.

Link to comment
Share on other sites

I have managed to fix it.  

 

On my VPS control panel I was able to change an overriding memory_limit which was set in the core php.ini file. To change this setting on WHM I went to Service Configuration -> PHP Configuration Editor.

 

This has stopped the error from occurring, unfortunately all the images appear blank now??  :-) Getting there though.

Link to comment
Share on other sites

  • 1 year later...

Hi,

 

I moved my Prestashop 1.6.0.7 to VPS. When I want regenerating thumbnails I have got error 503. This is my php.ini

 

memory_limit = 512M
max_execution_time = 1000;
max_input_time = -1;
post_max_size = 256M;
upload_max_filesize = 256M;
max_input_vars = 10000;
suhosin.get.max_vars = 10000;
suhosin.post.max_vars = 10000;
 
Of course in log I don't see any errors. When I switch to debug mode I see only notice.
 
Kind regards
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...