Jump to content

[SOLVED]Problem when i generate new images just 75 seconds


Recommended Posts

Hello guys, it's me again... sorry....

i tried to generate new images cause i put the watermark on my website, but i can't do that, i've just 75 seconds and then my website give me an error about the timeout.

I red something about the PHP.ini, so i tried to make an htaccess with :

 

SetEnv MYSQL.CONNECT_TIMEOUT 300

 

But nothing chaged, so i asked to my web hosting (OVH) and he said me this :

 

" you have to modify using this variable ini_set() di PHP  ----- $max_execution_time= ini_set('max_execution_time','40000'); and putting this on my PHP page "

 

 

So, now i'm a little bit confused... WHERE?? :D

 

if you have some idea, maybe is just a very easy thing.. but i can't do that.

 

Best regards a good work

 

Simo

 

 

 

 

 

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

Just locate the php.ini file your site is using (ask your hosting if you're not sure)

 

then find this

 

max_execution_time

 

and rise the limit. If it's not there add it

 

max_execution_time = 120

Thanks Nemo, just some questions, the php.ini i think i can't modify by myself, maybe i'm on a shared server, so i red that i've to modify the .htaccess to modify php.ini is that correct?  If yes, which htaccess i've to edit and which variable have i to use .

 

Or maybe i can modify the php.ini bymyself even on a hosting

 

Thanks a lot

Link to comment
Share on other sites

It shouldn't be necessary to force it further, you hard-modified the original file, correct? And use no overrides for it? If it's set then it might as well be your hosting, really

Hi Nemo,

so i didn't modify any original file, cause i'm a super noob :) the only thing that i've done is to install a theme, and the watermark module for modify the pics. Nothing more, and the hosting told me that i've to modify the php, but i don't think could be that ehhe but obviously i'm not sure. I thought that .htaccess file but.... i really don't know, sometimes i've the same error even when i save after a modification of an item, but when i refresh the modify has be done....

Link to comment
Share on other sites

some hosts will not allow you to increase the time out setting.  It won't complain if you try, it will just ignore it. 

 

75 seconds is not too bad for shared hosting, and Prestashop already accounts for this type of issue, by simply allowing you to run regen images multiple times.

 

1) The first time you regen images, you should select "erase previous images" as yes

2) Prestashop will remove the old thumbnails

3) Prestashop will start to re-create the thumbnails

4) After 75 seconds expire, you likely receive an error message or blank page of some sort. 

5) Just ignore and go back to images page in back office

6) All subsequent times you regen images, you should select NO for "erase previous images", since you already did that

7) This time, Prestashop will start to re-create any missing thumbnails

8) It will either complete, or time out after 75 seconds.  This all depends on how many images you have, and how powerful the CPU is on the shared environment. 

9) Just continue to repeat steps 5 - 8 until all thumbnails are created

Link to comment
Share on other sites

Yes, I mean if you added that value I mentioned to the original file. Since there are no overrides I don't understand why it's still 75 seconds. Is there any server-side caching like opc or alike? Using the xpresscache module?

I added that value on the original file.. :( is there a way to understand if i've OPC using xpresscache module? cause i really don't know what it is.. i mean hehehe i'm a super noob :)

Link to comment
Share on other sites

some hosts will not allow you to increase the time out setting.  It won't complain if you try, it will just ignore it. 

 

75 seconds is not too bad for shared hosting, and Prestashop already accounts for this type of issue, by simply allowing you to run regen images multiple times.

 

1) The first time you regen images, you should select "erase previous images" as yes

2) Prestashop will remove the old thumbnails

3) Prestashop will start to re-create the thumbnails

4) After 75 seconds expire, you likely receive an error message or blank page of some sort. 

5) Just ignore and go back to images page in back office

6) All subsequent times you regen images, you should select NO for "erase previous images", since you already did that

7) This time, Prestashop will start to re-create any missing thumbnails

8) It will either complete, or time out after 75 seconds.  This all depends on how many images you have, and how powerful the CPU is on the shared environment. 

9) Just continue to repeat steps 5 - 8 until all thumbnails are created

Thanks Bellini 13 i tried twice doing what you said... but i don't know how many times i've to do it, i've like 900 images, so i started first with (erase previous images) then, maybe 15 times the same thing without NO erase previous ecc...... but i didn't finish... the only strange thing that i found is under "abandoned cart" that i had super cart with lots of added item...

You think that i've to do more than 15 times?

Thanks a lot

Link to comment
Share on other sites

it is a possible technique that could work.  I cannot say how long it should take, it all depends on the horse power of your server. 

 

you can also reach out to your hosting provider and ask them why the limit is 75 seconds, and ask them how to override that.  as i stated before, some hosts will prevent and/or ignore the override as they do not want long running scripts taking up valuable resources on a shared hosting server.

Link to comment
Share on other sites

Ok done, it's a little bit long, but now everything works. I think isn't a server problem, cause sometimes even when i change order status the broswer start to work and i get a blank page, even if the status is already changed.... this usually happens when i do it for the first time, if i do the same action 3 seconds later everything works perfectly... it seems a cache's problem.. or maybe i've something other.... maybe on my theme... i don't know.

I'm going to put solved if someone doesn't understand how i did , contact me by message.

 

(in the image the thing that i don't understand it remain green for too much time, like he's going to search for something  that he doesn't find to finish the action)

tempo.JPG

Link to comment
Share on other sites

×
×
  • Create New...