forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 miscellaneous => Topic started by: pomcfey on July 25, 2019, 11:25:16 pm

Title: Experiencing timeout while updating thumbnails
Post by: pomcfey on July 25, 2019, 11:25:16 pm
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!
Title: Re: Experiencing timeout while updating thumbnails
Post by: ron4mac on July 26, 2019, 04:26:38 am
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
Title: Re: Experiencing timeout while updating thumbnails
Post by: pomcfey on August 08, 2019, 05:36:50 pm
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?
Title: Re: Experiencing timeout while updating thumbnails
Post by: ron4mac on August 09, 2019, 02:09:02 am
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
Title: Re: Experiencing timeout while updating thumbnails
Post by: 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()"
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
Title: Re: Experiencing timeout while updating thumbnails
Post by: 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
Title: Re: Experiencing timeout while updating thumbnails
Post by: ron4mac on August 10, 2019, 01:33:05 pm
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.
Title: Re: Experiencing timeout while updating thumbnails
Post by: ron4mac on August 10, 2019, 02:03:39 pm
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.
Title: Re: Experiencing timeout while updating thumbnails
Post by: Sweetener on August 10, 2019, 04:05:32 pm
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
Title: Re: Experiencing timeout while updating thumbnails
Post by: 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 (https://images2.imgbox.com/49/9c/mmBbJ6Sh_o.png)
Title: Re: Experiencing timeout while updating thumbnails
Post by: ron4mac on August 10, 2019, 09:24:45 pm
I tried the new tool and I got this error...
https://images2.imgbox.com/49/9c/mmBbJ6Sh_o.png (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).
Title: Re: Experiencing timeout while updating thumbnails
Post by: Sweetener on August 11, 2019, 03:12:12 am
up_thumb2
https://images2.imgbox.com/18/a8/6e7gf9CT_o.png (https://images2.imgbox.com/18/a8/6e7gf9CT_o.png)

up_thumb3
https://images2.imgbox.com/b5/31/TOQsm6Sm_o.png (https://images2.imgbox.com/b5/31/TOQsm6Sm_o.png)

same error, but up_thumb2 took A LONG time
Title: Re: Experiencing timeout while updating thumbnails
Post by: Sweetener on August 11, 2019, 03:13:23 am
I deleted some of the"Processing" lines so I can make a tinier screenshot
Title: Re: Experiencing timeout while updating thumbnails
Post by: ron4mac on August 11, 2019, 06:47:58 pm
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.
Title: Re: Experiencing timeout while updating thumbnails
Post by: Sweetener on August 11, 2019, 07:50:40 pm
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  ;)
Title: Re: Experiencing timeout while updating thumbnails
Post by: ron4mac on August 12, 2019, 02:50:23 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.