Jump to content

500 internal server error prestashop when regenerate thumbnails after moving to new host


Recommended Posts

Hi,

 

I am trying to move my website to a new webhost (1&1) however I have followed instructions but no images are showing on my website.

 

I have tried to regenerate thumbnails but I get 500 Internal Error.

 

I have tried to change the permissions to 777 on the img directory and sub-directories

 

Can someone please advise how I can fix this problem. I have around 3000 images. I still have access to the images from my the old server if I need to upload them again.

 

Any help would be very much appreciated.

 

many thanks

Nick

Link to comment
Share on other sites

Thank you for the quick reply, I have checked and my webhost (1&1) does not allow me to modify the loaded php.ini file /usr/lib/php5/php.in It is write protected .

 

Here is the current php.ini file.

 

 

memory_limit = 90M;

upload_max_filesize = 40M;

max_execution_time = 50000;

max_input_vars = 5000;

 

 

Do you have any other suggestions how I can get this to work.

 

Many thanks

Nick

Edited by nickfromtq (see edit history)
Link to comment
Share on other sites

I solved my issue with regeneration errors by repeating the procedure as many times as needed.

In my case it took like 10 times (clicks on "Regenerate thumbnails" with selected image sort if you dont regenerate all images, and unchecked "Erase previous images" checkbox /it should be checked only at first regeneration attempt/). I have some 700 base pictures which means many more different thumbnails.

I think you should be persistent enough in repeating the procedure, and eventually it will succeed.

 

edit:

correction - it took 10 times to regenerate just one sort of thumbnails. If you regenerate all thumbnails it can be many more times... and you'll be able to see a progress by refreshing your shop pages (you'll see more and more images show up)

Edited by core- (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi, thank you for your response, I have tried your suggestion however i am still no further on. maybe I should start again. can you please tell me if this will work.

 

1. Delete the img folder on newserver

2. Copy img folder from old server to new server

3. Click Regenerate Thumbnails (Select Image All - Erase Previous image ticked) - I know this will cause the 500 Internal Server error

4. Then click select image and chose Products and select format home with the Erase previous images un-ticked

5. repeat no 4 loads of times, then do the same for the different formats.

 

Many thanks

Nick

Link to comment
Share on other sites

The other thing I have noticed is that no images are displaying, even when I am on the product page.

 

Do you think that is why the thumbnails are not being created because there is no image being displayed in the first place, so it is like it is trying to make a thumbnail of an image that does not exists so to speak.

 

Any advise would be very appreciated.

 

many thanks

NIck

Link to comment
Share on other sites

I have found out that I can change the php.ini (I needed to create a new php.ini in my home directory) My php.ini file reads.

memory_limit = 90M;

upload_max_filesize = 40M;

max_execution_time = 50000;

max_input_vars = 5000;

 

 

however I still get the same error when trying to generate the thumbnails. Is my php.ini file correct ?

 

any more help would be great.

Link to comment
Share on other sites

I have tried to get more information in regard to the error log, however I cant get any 1 & 1 have not been very helpful. I dont know what else I can do.

 

I have signed up to go daddy and im having problems uploading my sql database. can anyone recommend a good UK webhost that works well with prestashop.

 

many thanks

Nick

Link to comment
Share on other sites

Nick, have you had any luck with this? I'm having the same issues. I have a dedicated server and have removed all max_excution_time limits in every loaded php.ini file, and still getting 500 internal server error. Have about 60k products to create thumbs for.

Link to comment
Share on other sites

I dont have access to change the apache httpd.conf file, I think that is set by the webhost. And 1 and 1 were very unhelpful

 

Your webhost is able to perform this ask. However, you can also find this setting in your php.ini called max execution time. I hope this helps. By the way, you should really look into changing Hosting Providers because 1 and 1 has shown to be very unhelpful for many people. I recommend BlueHost because they have a great simple script install, great prices and great customer service. Also, you won't be having many of the server side config errors or unhelpful staff that you may find at 1 and 1. Just my two cents! Thank you for choosing PresatShop

Link to comment
Share on other sites

Your webhost is able to perform this ask. However, you can also find this setting in your php.ini called max execution time. I hope this helps. By the way, you should really look into changing Hosting Providers because 1 and 1 has shown to be very unhelpful for many people. I recommend BlueHost because they have a great simple script install, great prices and great customer service. Also, you won't be having many of the server side config errors or unhelpful staff that you may find at 1 and 1. Just my two cents! Thank you for choosing PresatShop

 

I was really looking for a uk host as we are based in England and are cusumters are only from the uk

 

Many thanks

Nick

Edited by nickfromtq (see edit history)
Link to comment
Share on other sites

  • 6 months later...

Additional info :

 

perhaps this issue is in same category with the issue I have with creating combinations.

(Posted it on dutch section of forum )

 

http://www.prestashop.com/forums/topic/232169-problemen-bij-het-maken-van-opties-attributen-bij-produkten/page__p__1141919?do=findComment&comment=1141919

Edited by racemaniac (see edit history)
Link to comment
Share on other sites

Reply from my hosting-provider :

 

Arie,

Thanks for your continued business.

I have adjusted the timeout up to 90 seconds and I performed a process trace on the application. It appears to be parsing a large amount of data throughout the entire 60 seconds. Do you know if there is a way to reduce the amount of work it is doing or batch the process out over a few page refreshes?

Also the memory limit is already at 128MB which is pretty health for a shared account.

Unfortunately on shared hosting you do not have access to the global php.ini file.

 

Thanks!

Admo.net Support

 

My reply on that one :

 

This is correct. It's a process where up to 500 products a thumbnail must be created. This regeneration is a process which will ot be done often but needs to be done sometimes.

I'll put your anwser and question on the prestashop forum, perhaps someone knows if the process can be spilt into several batches.

I'll keep you informed

 

Thx for so far, please leave this tichte open untill really solved 8-)

 

Arie

 

So "next question is " is there a possibility to split the regeneration process besides selecting "small_default" "large_default"

 

This would reduce the number of "work to be done"

Link to comment
Share on other sites

I think I found a kind of solution.

 

Ive installed PS on my local machine ( using easyphp) and restored the original on-line database into my local database.

On this local installation I was able to regenerate the complete set of images. No server 500 error (logical cause it's a local process so no bandwith is used causing time-out errors)

 

Now I'm gonna copy the complete img directory from my local machine to the on-line PS img directory and see if all of the thumbnails and other images appear as they should.

 

keep you all posted :D

Link to comment
Share on other sites

There are 500+ products. I regenerate the seperate thumbnails (home_default etc)

after about 90 secs the error 500 appears.

Perhaps the large number of combinations of some of the products ( 12 colors, 23 "text" options) might be the problem. ( see my other post about combinations and the problem I'm having there)

 

Provider ( admo.net) did some adjustments but no "result"

 

I've copied the database to my local machine, installed EasyPHP and regenerated "local" no problem at all

Link to comment
Share on other sites

  • 4 weeks later...

I also get constantly

Internal Server Error

 

when i try to import a large amount of products.., rebuilt the index, etc

 

I have 5000+ products...

and 14 different domainnames.. i'm using multistore

when i want a new store.. with the same products as my mainstore.. i always get internal server error..

 

I have my own VPS so i can set it anyway i want to get the job done.

 

What settings i need to use to stop getting this annoying Internal server errors.. also no possibility to proceed from where error occured

 

i worked on this new site for 3 months and really getting tired of this delays.. beginning to think i choose the wrong shopscript..

 

 

So what are the settings to make it work as fast and as stabil as possible... the vps is only for my shops so i dont need any limitations

  • Like 1
Link to comment
Share on other sites

Extend memory_limit = 128M;but let that your hosting service do that.My prestashop is 1.4.7.0.

It is working for me use hostgator customer service is best! They will do business for you.

Problem is solved i have 25000+ products all pictures Regenerated. Time is longer but you will get internal server error,uncheck Erase previous images and you will need to do this process more times.

Link to comment
Share on other sites

  • 8 months later...

I stumbled across this post after having the same problem. My image regeneration was timing out after 45 seconds. My php.ini timeout settings (local and global) were set at 600 seconds so no problem there and were definitely loaded correctly. After looking at my server's error log, it turned out the the problem was with the Fast CGI module in Apache (mod_fcgid). I solved this by editing the fcgid.conf file and changing the timeout setting from 45 to 600. The file is location different for each OS (on my Ubuntu VPS it's located here: /etc/apache2/mods-available/fcgid.conf).

 

Hope this solution helps someone!

 

Link to comment
Share on other sites

  • 10 months later...

Hi to all,

I set the configuration as sujested http://presto-changeo.tumblr.com/post/17589539698/understanding-php-ini-how-and-why-you-need-one

 

but when I try to rebuilt the index it continues to give internal error 500. This happen after import the update catalog using csv file. before transfer to new hosting was working correct.

 

this is my info.php 

 

http://www.aostastore.it/info.php

 

Someone could help me please?

 

Thanks,

 

Marco

Link to comment
Share on other sites

  • 3 months later...

Hello.. I have encountered this problem.. I have tried all solutions provided, i am still not getting any results.. Pls I need help. The website is www.soldesci.com. I am using prestashop 1.6.0.9

Internal Server Error

"The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request

This is the code htaccess at the root of <web>

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
 
<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>
 
RewriteEngine on
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
 
# Images
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
 
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>
 
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff
 
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
ExpiresByType font/ttf "access plus 1 year"
ExpiresByType font/otf "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType application/x-font-otf "access plus 1 year"
</IfModule>
 
FileETag INode MTime Size
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript
</IfModule>
</IfModule>
 
#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404
 
# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
 
# start ~ module watermark section
Options +FollowSymLinks
RewriteEngine On
 
RewriteRule [0-9/]+/[0-9]+\.jpg$ - [F]
# end ~ module watermark section
THIS WAS THE ERROR LOG ON THE SERVER

[Fri Feb 27 16:45:03 2015] [error] [client 5.49.10.85] Request exceeded the limit of 10 internal redirects due to probable configuration error
 
I AM  HOSTED AT LWS AND MY SERVER IS ISPconfig3..
 
PLS i NEED HELP
 
THANKS
Link to comment
Share on other sites

  • 2 months later...

Hi guys

 

I have this same problem....error 500 after 5 minutes. I've changed all configurations in php.ini as advised....time_out....etc...Also changed the fast cgid and have the same problem. When I try to regenerate thumbnails the server give me this annoying 500 error.

 

I have PS 1.6.0.9 and my server is cloud VPS with Ubuntu 14.04 and 4 Gb memory.....so I suppose I have a fast enough server to deliver more than 5 minutes processing....

 

So, if it's not php.ini or fcgid....what might be???

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Same timeout issue here on PS 1.6.0.9 on a VPS with lots of CPU and RAM available.

 

Anyone with a large shop 1000+ products on the forum that manages to go through with regeneration without timeout? If yes, what's your secret!?! ;-)

 

Also, are these settings still considered ideal, or have things changed? The post is three years old, so maybe Tomerg has an update on this? http://presto-changeo.tumblr.com/post/17589539698/understanding-phpini-how-and-why-you-need-one

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

if you are using NGINX, try to increase proxy timeout

    proxy_connect_timeout   90;
    proxy_send_timeout  90;
    proxy_read_timeout  90;
    proxy_buffers       32 4k;
 

in /etc/nginx/nginx.conf

try to increase in seconds (I put 9000)

It worked for me :)

 

 

 

Link to comment
Share on other sites

  • 3 years later...

I had this problem.

 

Run the “Regenerate Thumbnails” process for each class of image:

Categories

Manufacturers

Suppliers

Scenes

Stores

Products (Do this one last as it probably has the most images)

 

Instead of timing out, you should get an error message showing which items have the problem.  In my case we had 3 products with missing images.

 

Edit the products and delete any “ghost” images.

 

Re-run “Regenerate Thumbnails” for which ever class of image had the product, et voila!!!

 

Well, it worked for me. :)

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...