[Statistics 0.5] 30 Second timeout - solved...


Joined: 2007-08-24
Posts: 2
Posted: Fri, 2007-08-24 02:14

In the Statistics V0.5.0 module, I was having issues with the "Recalculate" function timing out after 30 seconds.

By adding:

in RecalculateStatistics.class in the run() function after "global $gallery;" I was able complete the recalculate statistics function (in greater than 30 seconds).

$gallery->guaranteeTimeLimit(300); in the getBasic() function in StatisticsAdminDiskUsageHelper.class but that is no longer sufficient for the 0.5.0 version.

I'm not a professional programmer, so someone might want to check if the fix is in the right place and add it to the codebase.



Joined: 2005-12-07
Posts: 56
Posted: Tue, 2007-08-28 10:51


I didn't think this would be an issue with the new disk space algorithm, how big is your gallery?

Mine is around 20Gb and the algorithm completes in 2-3 seconds!

I've added the fix in my local copy, I'll propagate the fix through DP when the rest of the changes get done.

Thanks for reporting it.


Joined: 2007-08-24
Posts: 2
Posted: Tue, 2007-09-04 01:52

I'm just shy of 11GB for the gallery data directories, a little over 5K items. The server is a Dual-core Intel, running Windows XP, PHP 5.2, Apache 2.2.4, mysql 5.0.27, gallery 2.2.1.

I run my hard drives (SATA) in a raid 1 (mirrored) configuration.

Gallery has so many derivative files that I think it takes some time to get through all the directories.

Doing a Rescan - It scans my "root directory" for about 75 seconds and to complete takes a total of ~100 seconds.

Do you go through all the directories on my hard drive, or just the gallery data directories? I have a lot more files on the drive than just the gallery data files.

Thanks for your module, it provides great information.

Best Regards,