Batch Upload & Thumbnail Creation Overload Batch Upload & Thumbnail Creation Overload
 

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

Batch Upload & Thumbnail Creation Overload

Started by Coldfinger, April 06, 2004, 12:13:23 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Coldfinger

I'm a Reseller and today I received this message from the support staff of the company I'm reselling for. Please assist, as I'm not completely sure of how to best attack this issue:

---
Our monitoring systems on your reseller server picked up a couple huge spikes in load this afternoon, one just now. The reason for it was a huge conversion of images to thumbnails within one of your resold accounts. It was using the convert program and converting up to 20 images at the same time.

It appears to be generating from your showthumb.php page. Is there a way that you can set your script so that it generates the thumbnails in a more sane matter, that is it steps through them one at a time rather than generates them all at the same time. Usage such as this puts the server at risk. I have chmod'd the showthumb.php file to 000 for now to make sure no more thumbnails are generated in this manner. Can you get back to me on how you will rectify the situation.

---

I'd appreciate any/everyone who can contribute. . .

-Coldfinger
imagine. conceive. embrace.
www.coldfingersolutions.com

omniscientdeveloper

If I remember correctly, it's the addpicture.php page that creates the thumbnails and not the showthumb.php page. Currently, the only way I think you can stop that is by disabling the batch upload process, which would suck, but it would work.

In my opinion, your host sucks. Switch to www.rackshack.net or something better.

Coldfinger

You're right, disabling the batch upload would suck. That's the premiere feature my client enjoys.

Is there a way to not have the thumbnails appear during the batch upload process? Would that solve the issue? When I spoke back to them, they expressed that it wouldn't be an issue if I were on a dedicated server because the resources for the script wouldn't be shared.

The only thing I can think of now is to ask the client to not upload so many pictures in one sitting. But again, that was the luxury they enjoyed.

Any other suggestions? Should I attempt to edit the addpicture.php page?  :?

-Coldfinger
imagine. conceive. embrace.
www.coldfingersolutions.com

Joachim Müller

there is neither a file called addpicture.php nor showthumb.php in coppermine. Are you sure you're using coppermine and not another gallery application?

GauGau

Coldfinger

C'mon man. . .Yes, I'm using Coppermine. It's the only program I use.  :)

And I've located both files in question. Showthumb.php and addpic.php are both in the main folder (same folder that houses the "albums", "bridge", "docs", "images", "lang", "sql" and "themes" folders).

Feel free to respond. I'm still patiently waiting for assistance  :( . . .
imagine. conceive. embrace.
www.coldfingersolutions.com

Joachim Müller

I agree to what omni said: your webhost sucks - the webserver should be able to stand batch-add of 20 pics at once. I can't think of another option, except disabling batch-add (as omni pointed out already). That's the way coppermine works...

GauGau

hyperion

I'm not sure how the calls to IM are behaving on this system, but it sounds like it could be multithreading them.  Thus you get 20 calls at the exact same time rather than in quick succession one after another.  You might switch the account to GD2 to see if you can get the requests to que within PHP instead. That might not do anything for you, of course, as I am just speculating without access to the system monitor to see the actual behavior. If they are queing and host simply doesn't like the 20 calls in rapid succession, you'll need a dedicated server.  Another option is the multi-HTTP uploads  in CPG1.3.  That spreads resource use over time, but it is limited by upload restrictions and requires user action for each picture uploaded.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Coldfinger

Thanks y'all.

GauGau: The issue they brought up is not that it's too much for the server, but they wanted me to keep it moderated to be "fair" to others accessing the same script on these shared servers. . .I suppose  :?

Hyperion: Yeah, I think it's a preference issue. They would like for me NOT to have so many calls in succession. I may try switching to GD2, but I was using IM so the client could upload .gifs. I'll investigate further, though. If it'll help, that'll be great.

If any more ideas hit you, feel free to respond. I would consider other hosts, but these guys have actually been really great. Features, scripts, price, etc.
imagine. conceive. embrace.
www.coldfingersolutions.com

omniscientdeveloper

The 1.3 beta allow you to upload gifs with GD, but it uses image scrunching. (It resizes the image by changing the height/width in the image tag.)

Although I don't suggest switching right now, you could upgrade once the final version is released.

hyperion

Coldfinger,

If your client has XP, consider having him try the XP publish feature.  This creates a continuous slow feed, so the additions should not overwhelm the server.  You can play with xp_publish.php to change the directory naming conventions. (Also, a small bugfix was done for directory naming in 1.3 -- please see the 1.3 testing board for details.)
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)