View Full Version : Coppermine CPU Exceeded
matthewsage
11-27-2007, 02:18 PM
I realize that this has been covered and talked about extensively in this forum. However, there is one aspect I would like to bring up to see if anyone here has any suggestions.
Expecting a shared-hosting website to handle all of the image resizing and thumbnail creation is too much, and I know that. But I get the dreaded CPU exceeded error just by adding the photos into the coppermine database. I create all of the thumbnails and intermediate images locally and then upload via ftp. But, I have to insert them (i.e. have coppermine parse the exif and iptc data) into the photo program, otherwise I can't display. This parsing is taking over the cpu everytime. I have over 9000 photos to add, and I do them in batches as small as 50 and it still too much.
This is a vanilla bluehost fantastico install. I think I should be able to insert photos into the database. Is coppermine that poorly scripted?:(
betiryan
11-27-2007, 05:25 PM
I've had Coppermine for over 2 years with no problems at all. I did not do the install via fantasico, I did it manually. That may or may not be your problem.
HTH,
GOD BLESS,
Beti
http://vetstribute.com
matthewsage
11-27-2007, 05:26 PM
Well, I tried going down to just 10 pictures at once, and I still just got the CPU exceeded error.
For those unfamiliar with coppermine, there is a Batch Add Tool that lets you browse to a directory and select the files in that directory for adding to the database. I have all of my photos as originals, then as normal_[filename] and thumb_[filename], which makes it so coppermine doesn't have to do any image resize or converting. It simply has to inject data into the mysql database after parsing the jpgs for their exif and iptc info.
I can't believe that that operation would take 20% of the cpu resources of the server. Maybe bluehost is using really slow/weak servers?
matthewsage
11-27-2007, 05:28 PM
Thank you for the response. You responded while I was posting again, so that's why it wasn't acknowledged in my above post.
That's a thought, though. Maybe fantastico isn't installing it correctly. I also have on of the larger accounts, 350gb of storage. Maybe there are too many websites crammed onto one server? I don't know, but it would be nice to be able to use a photo gallery.
matthewsage
11-27-2007, 11:59 PM
Does anyone know the actual amount of cpu time a script has to use in order to go over the limit?
Going through my CPU exceeded logs I don't have any processes using more than 1 second of cpu. Granted there's a lot of them (each photo added to coppermine averages about .25 seconds of cpu time), but individually they aren't much.
An actual amount would be helpful so I could figure out how many pictures I can batch add during every 60 second "sliding" window as bluehost calls it.
felgall
11-28-2007, 12:36 AM
To quote from the page on BlueHost where all the information about CPU limits and what to do about them:
CPU Quota/Suspension Errors are currently triggered by a single process taking more than 30 CPU seconds to run or if your total processes take more than 40 CPU seconds in any 60 second window. They are set up like this to avoid server lockups. Your site will generally come back up after 5-10 minutes of suspension.
http://helpdesk.bluehost.com/kb/index.php?x=&mod_id=2&id=498
matthewsage
11-28-2007, 08:59 AM
Felgall, thank you for the reply. I hadn't seen that quote in the helpdesk.
I think their policy must have changed, however, and bluehost simply hasn't updated their helpdesk documentation yet. I used to be able to use coppermine to do batch adds, however it no longer works.
The CPU exceeded logs indicated that the processes are indeed using more than 40 seconds of CPU time (on average for the 4 shutdowns my site had it was 43 seconds). However, it is over a 2 minute window, not 60 seconds. For example the last log shows this:
Tue Nov 27 23:29:30 2007: used 0.01
...all the way to...
Tue Nov 27 23:31:35 2007: used 1.06
All of the in between cpu logs total to 47.25 seconds.
It would be great if bluehost could confirm this change from a 60 second window to a 120 second window. It basically cuts in half the amount of CPU a site is allowed to use.
ImAddicted
12-06-2007, 09:11 PM
I have the exact same problem - love the site, hate the batch add. It is the only thing that gives me any problems. I have been with other hosts and NEVER had that problem. I am not sure what the issue is. Maybe I should have done my own install instead of fantastico. But, 7,000 photos later is a bit late to re-do.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.