Announcement

  •  » Requests
  •  » Synchronizing metadata TIMEOUT and upper limit tests/results

#1 2005-07-25 08:53:01

brianstanfill
Member
Palmer, Alaska
2005-07-01
20

Synchronizing metadata TIMEOUT and upper limit tests/results

Hello,

I'm still having the problem that my PWG 1.4.1 installation will not successfully synchronize metadata. Using this setup:

+ files metadata with database elements informations. Used metadata : basic (filesize, width, height), IPTC(keywords, date_creation, author, name, comment).
    + only never synchronized elements


The operation times out after exactly thirty seconds in Firefox, Explorer, Netscape, and Opera. The resulting page is blank white with the following View > Source information for each browser:

Opera:

Code:

<!-- get_filelist : 0.307 s -->

Firefox:

Code:

<!-- get_filelist : 0.238 s -->

Netscape:

Code:

<!-- get_filelist : 0.236 s -->

Explorer:

Code:

<!-- get_filelist : 0.403 s -->

These tests suggest that PHPWebGallery is unable to completely synchronize 7557 images and 411 categories in 30 seconds. There must be a timeout function set to 30 seconds somewhere in the code. I don't know where to look.

I've tested the very same synchronization settings with various amounts of images/categories combinations:

1034 images and 32 categories successfully synchronized files metadata in 6 seconds.
1681 images and 47 categories successfully synchronized files metadata in 8 seconds.
1983 images and 56 categories successfully synchorinzed files metadata in 10 seconds.
2423 images and 70 categories successfully synchronized files metadata in 14 seconds.
2571 images and 76 categories successfully synchronized files metadata in 14 seconds.
3607 images and 163 categories successfully synchronized files metadate in 27 seconds.


After these tests, I'm convinced the "upper limit" is in the timeout of 30 seconds. The software will only synchronize as many elements and categories metadata which can be parsed by the software in the 30 second time period.

When more elements exist than can be parsed in 30 seconds, no elements metadata are successfully synchronized. Only when ALL elements are parsed within the 30 seconds does PWG return a "success" page. All tests taking longer than 30 seconds end in the blank white page with no modifications to the database.

Please consider this as a "bug" for those of us pushing our galleries to their limit with many hundreds of categories and many thousands of pictures.

Thanks!

Brian Stanfill
http://pershot.com


So long as there is a system and so long as there are people like me, we will maneuver the system so as to best achieve the best outcome for yours truly.

http://pershot.com

Offline

 

#2 2005-07-25 20:32:46

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Synchronizing metadata TIMEOUT and upper limit tests/results

30 seconds for php : it is frequently a host limitation parameter.
It isn't a limit of PWG at all.


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#3 2005-07-25 21:44:12

brianstanfill
Member
Palmer, Alaska
2005-07-01
20

Re: Synchronizing metadata TIMEOUT and upper limit tests/results

VDigital wrote:

30 seconds for php : it is frequently a host limitation parameter.

Then this setting should be adjustable within the PHP 5 configuration file (php.ini)? Is anyone familiar with what exactly needs to be changed in the php.ini file?

I've searched Google and also read the possibility that the Apache configuration file may also need to be adjusted.

Brian

Last edited by brianstanfill (2005-07-26 05:16:35)


So long as there is a system and so long as there are people like me, we will maneuver the system so as to best achieve the best outcome for yours truly.

http://pershot.com

Offline

 

#4 2005-07-26 07:10:10

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Synchronizing metadata TIMEOUT and upper limit tests/results

Just have a look to "set_time_limit".

Description
void set_time_limit ( int seconds )


Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds ...

Cf. PHP Documentation.


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#5 2005-07-26 20:41:52

brianstanfill
Member
Palmer, Alaska
2005-07-01
20

Re: Synchronizing metadata TIMEOUT and upper limit tests/results

Metadata synchronization results

    * 7533 elements informations synchronized with files metadata
    * Used metadata : basic (filesize, width, height), IPTC(keywords, date_creation, author, name, comment)

Page generated in 112.809 s (13 SQL queries in 6.570 s)


I have successfully increased the execution time for PHP scripts.

The answer lies in the php.ini file which may be located (for Apache) in the PHP root directory and/or the Apache2 root directory.

If you do not have access to the php.ini file, using a .htaccess file to achieve the change may also work. I haven't tested this yet. I suppose the .htaccess file will need to be placed in the directory common to update.php which is phpwebgallery\admin\ within the PHPWebGallery directories.

Here is the code within php.ini needing adjustment:

Code:

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60  ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)

Change max_execution_time = 30 to an amount which is long enough for your script to parse all your data.

Mine now looks like:

Code:

max_execution_time = 120     ; Maximum execution time of each script, in seconds

That is also the line of code which I think may also work in a .htaccess file. I still need to test that; I will update my post with results. Anyone else willing to test the .htaccess file for this process is welcome to do so and post their results for others to read.

Hopefully this will solve the timeout problems those of us with thousands of elements and categories are experiencing.

Thanks for everyone's help!

Brian Stanfill


So long as there is a system and so long as there are people like me, we will maneuver the system so as to best achieve the best outcome for yours truly.

http://pershot.com

Offline

 

#6 2005-09-08 23:12:51

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13795

Re: Synchronizing metadata TIMEOUT and upper limit tests/results

Thanks for this topic containing many details (but how did you find the HTML comment displaying the execution time! I thought I was the only one to use it during stress tests).

In my opinion, you don't go the right way. Instead of trying to synchronize all pictures, you should consider why I've added a select box to choose a single category. Indeed, you'll obviously reach the max execution time limit with enough photos. Synchronizing top categories one by one should solve the problem efficiently.

I promise I've made all what I could for PhpWebGallery performances.

Offline

 

#7 2005-09-09 01:58:10

brianstanfill
Member
Palmer, Alaska
2005-07-01
20

Re: Synchronizing metadata TIMEOUT and upper limit tests/results

z0rglub wrote:

(but how did you find the HTML comment displaying the execution time! I thought I was the only one to use it during stress tests).

Do you mean this comment: "<!-- get_filelist : 0.307 s -->"

brianstanfill wrote:

The operation times out after exactly thirty seconds in Firefox, Explorer, Netscape, and Opera. The resulting page is blank white with the following View > Source information for each browser

The commented execution time was available once the script exceeded the maximum execution time specified within php.ini.

z0rglub wrote:

Instead of trying to synchronize all pictures... Synchronizing top categories one by one should solve the problem efficiently.

Yes, I suppose it would. However, it inevitably took a max execution time of 200 seconds to successfully synchronize all 8000 images' metadata. I only needed to synchronize the whole lot once. From there after, the maximum number of files synchronized at a time will not exceed a couple hundred.

The reason I sought to do it my way instead of selecting individual categories is because I knew there was a solution. I couldn't help myself but try to find it :-)... I just love troubleshooting and solving problems.

Thanks for your continued help in my mad endeavors. LOL.

Brian


So long as there is a system and so long as there are people like me, we will maneuver the system so as to best achieve the best outcome for yours truly.

http://pershot.com

Offline

 
  •  » Requests
  •  » Synchronizing metadata TIMEOUT and upper limit tests/results

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact