Experiencing timeout while updating thumbnails Experiencing timeout while updating thumbnails
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Experiencing timeout while updating thumbnails

Started by pomcfey, July 25, 2019, 11:25:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pomcfey

Hi there,

I was wondering if there was a solution to experiencing timeout while updating thumbnails. I've read on the forum that I should increase the value of the token lifetime but that was on the 1.5 version. Will that work for the 1.6 version? We have a huge gallery with almost 200k pictures in it. I also have another gallery with fewer pictures (17k) and experienced timeout anyway.

Any help would be appreciated. Thanks!

ron4mac

#1
With CPG 1.6.06+, the client machine asks the server to update images 10 at a time. So there should not be an issue with the PHP process on the server timing out. There is visual feedback as this is happening.
With each request being made to the server, though, there is a token that is checked and has a default lifetime limit of 1 hour. If you have more images to process than what can be done in an hour, you will have to increase that token lifetime (or do fewer images at once). And since the recurring requests are coming from the client machine, you need to keep that browser window and machine alert.

You could also just comment out the line that dies with a token timeout...
CPG 1.6.06, util.ajax.php, line#50

pomcfey

Well, I'm not sure if this counts as "timeout" but when I was trying to update the thumbnails it just froze....It didn't give me any errors, but the progress bar wasn't moving anymore so I just thought it meant timeout.

How can I configure it to do fewer images at a time?

ron4mac

#3
Unzip the attached into the tools folder of your CPG install. There will be a new admin tool to update thumbs (debug). Try using it and post the results here.

UPDATE: corrected tool code to remove error that was being forced for testing purposes
UPDATE2: only fail with fatal errors

Sweetener

Im experiencing a similar problem, I tried what you told us and this error pops up "Call to undefined function resize_imagee()"
Also, my thumbnail updater is not working because of a picture that I uploaded that it is not "compatible" with the gallery idk, because I figure out some pictures that were giving me errors. Sadly, I couldn't figure out them all. Is there anyway to go back to the "old" updater, because that one showed you which pic was the lasted to update so u would know which one is the "bad" one

Sweetener

I managed to do 1000 pictures per update. I did that by deleting all the other tables, but not that one. And that took me almost hours. So it is a problem with the time out after all

ron4mac

Quote from: Sweetener on August 10, 2019, 06:05:59 AM
Im experiencing a similar problem, I tried what you told us and this error pops up "Call to undefined function resize_imagee()"

Ooops ... I accidentally left in a forced error that was there for testing the tool.
Please try using this again to try discover and resolve issues with thumb updates. I have no large gallery where I can experiment.

ron4mac

Quote from: Sweetener on August 10, 2019, 08:10:13 AM
So it is a problem with the time out after all
A problem for updates taking more than 1 hour would be a timeout issue ... but that could be taken care of by making the token timeout in the config very long.  The bigger problem here is that some error situation is occurring but it is not being reported.  And that is what i would like to find a solution for.  Any help from people with large galleries would be much appreciated.

Sweetener

I've already updated the tools, and yes it fixed the error. Sadly, I wont be able to run the thumb generator now. If u need an account I'll happily provide one through dm so u can see the problem that I'm experiencing


ron4mac

Quote from: Sweetener on August 10, 2019, 08:26:08 PM
I tried the new tool and I got this error...
https://images2.imgbox.com/49/9c/mmBbJ6Sh_o.png

Please try again with the replaced version above.

And attached here is a version that will do 1 file at a time and display each file name (similar to the "old" way).


Sweetener

I deleted some of the"Processing" lines so I can make a tinier screenshot

ron4mac

Quote from: Sweetener on August 10, 2019, 08:10:13 AM
I managed to do 1000 pictures per update. I did that by deleting all the other tables, but not that one. And that took me almost hours. So it is a problem with the time out after all

So, for you, the issue is the token lifetime. You can increase the lifetime to a large value in the config.
Or you can comment-out the token check as I described above.

The next release of CPG (1.6.07) will try to remedy this type of issue in a better way.

Sweetener

Thank u so much!

Also, if you are looking for a translator to make the Spanish translations, I am an almost B2 in the FCE and I would love to help  ;)

ron4mac

Quote from: Sweetener on August 11, 2019, 07:50:40 PM
Also, if you are looking for a translator to make the Spanish translations, I am an almost B2 in the FCE and I would love to help  ;)
Language translations are welcome contributions.
You could start with the last Spanish file that came with CPG 1.5.x:
https://sourceforge.net/p/coppermine/code/HEAD/tree/trunk/cpg1.5.x/lang/spanish.php
Place the file in your gallery lang folder.
There is a PHP file in your gallery folder, lang_check.php, that you can run to help see what changes are needed.