[Solved]: Searchnew.php - Batch Add takes excessive amount of time to initially load [Solved]: Searchnew.php - Batch Add takes excessive amount of time to initially load
 

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

[Solved]: Searchnew.php - Batch Add takes excessive amount of time to initially load

Started by steve6one7, June 12, 2009, 03:08:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

steve6one7

Coppermine Gallery Link : ( s o v i p [dot] c o m / gallery /  )
Coppermine Gallery version :  1.4.24

A non-admin test user account
u: cpmtesting p: cpmtesting


I have photographers that upload to our gallery site and when they click the batch-add link it usually takes over a minute to load. Many times it never loads and the page timeouts. We currently have 16127 files in 159 albums and thousands of photos are added each month. We don't have all the folders in the root of the batch-add. We created 1 folder called uploads that you need to click into and then all the sub folders are shown. It appears the script loads all the sub folders into memory before allowing directory browsing which is taking up too much time and the page never loads.

Note: There is no problem uploading and batchadding files. The problem is the amount of time it takes for the searchnew.php page to initially load. It has significantly slowed down as the amount of directories and pictures has increased.

About 2 minutes will go by then the page will go all white. No error messages are displayed and nothing is ever loaded. I downloaded and ran Httpwatch to see what responses from the server I received during the time-out. After 60 seconds of waiting for the page to load I get a "NS_ERROR_NET_RESET" then the browser automatically refreshes the connection and after another 60 seconds I get a final "NS_ERROR_NET_RESET". The error message means: "The connection was established, but no data was ever received." Attached to this post is a printout of the results.

I made a parallel coppermine installation using the same config but without the albums folder and the searchnew.php loads instantly. It is definately related to the amount of directories that are present. Once it is loaded we are able to successfully add hundreds of photos at a time. Is there a modification I can make to the searchnew.php script in order to load faster?

Is there something I need to do to add the existing folders that I have already added to the do-not-propagate list?
Is there a modification I can make to the searchnew.php script in order for it to load faster?


Nibbler

Are you using browsable mode?

If so, try removing


display_dir_tree('', '');


from searchnew.php.

steve6one7

Thank you for your help Nibbler. I will try that out and let everyone know.

I just tested the cpmgallery test account I created to ensure supports could test uploading to a public album and I realized the upload fails "0 uploads were successful." I tested with the admin account and get the same error. I was able to do this yesterday so this is a new issue that I need to fix first before I try your batchadd fix.

Just wanted to let people who are trying to diagnose the aforementioned issue that they will be unable to upload but it isn't related to the batch add problem I'm experiencing. I will update once I know.

Thank you again

steve6one7

Worked like a charm, the searchnew.php loads instantly now. Thank you for your help!