Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Batch Upload & Thumbnail Creation Overload  (Read 4576 times)

0 Members and 1 Guest are viewing this topic.

Coldfinger

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • http://www.coldfingersolutions.com
Batch Upload & Thumbnail Creation Overload
« on: April 06, 2004, 12:13:23 am »

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
Logged
imagine. conceive. embrace.
www.coldfingersolutions.com

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Batch Upload & Thumbnail Creation Overload
« Reply #1 on: April 06, 2004, 12:37:26 am »

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.
Logged

Coldfinger

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • http://www.coldfingersolutions.com
Batch Upload & Thumbnail Creation Overload
« Reply #2 on: April 06, 2004, 02:25:03 pm »

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
Logged
imagine. conceive. embrace.
www.coldfingersolutions.com

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Batch Upload & Thumbnail Creation Overload
« Reply #3 on: April 07, 2004, 07:28:58 am »

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
Logged

Coldfinger

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • http://www.coldfingersolutions.com
Batch Upload & Thumbnail Creation Overload
« Reply #4 on: April 09, 2004, 03:03:50 pm »

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  :( . . .
Logged
imagine. conceive. embrace.
www.coldfingersolutions.com

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Batch Upload & Thumbnail Creation Overload
« Reply #5 on: April 09, 2004, 04:13:47 pm »

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
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Batch Upload & Thumbnail Creation Overload
« Reply #6 on: April 09, 2004, 04:21:40 pm »

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.
Logged
"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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Coldfinger

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • http://www.coldfingersolutions.com
Batch Upload & Thumbnail Creation Overload
« Reply #7 on: April 09, 2004, 08:53:16 pm »

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.
Logged
imagine. conceive. embrace.
www.coldfingersolutions.com

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Batch Upload & Thumbnail Creation Overload
« Reply #8 on: April 10, 2004, 08:53:22 am »

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.
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Batch Upload & Thumbnail Creation Overload
« Reply #9 on: April 15, 2004, 01:24:31 am »

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.)
Logged
"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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 18 queries.