homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

phpThumb is killing my server. Help

 7:28 pm on Oct 22, 2010 (gmt 0)

I'm using phpThumb to generate thumbnails. it worked grate for 4 years since a few days ago when it started to kill my server.

the server load goes through the roof.

i didn't make any changes to the script or to anything on the site, and the traffic did not get higher. however, over night phpThumb is using almost all my CPU

the cache in phpThumb is working

please help. I'm getting desperate.

anyone else enountered this problem?



 8:42 pm on Oct 22, 2010 (gmt 0)

is any process stuck ? did you restart your server? is there a huge image to create a thumbnail of ? that might be causing the script to hang


 9:33 pm on Oct 22, 2010 (gmt 0)

no process stuck. i did restart the server and the problem continued and no large image


 9:43 pm on Oct 22, 2010 (gmt 0)

I remember that class it keeps a cache of images and no auto-cleanup if I remember correctly. You will have to clean up the thumbs manually (there should be a cache folder under phpThumb). What I don't understand though is that the thumb files must be accessed for the server load you describe.

If some traffic is causing it you may want to implement cold image linking where the images are outside the web-root and an intermediate server script accesses them and randomizes the image link so images cannot hot-linked.


 10:32 pm on Oct 22, 2010 (gmt 0)

the cache cleans out ok.
what i dont understand is this:
if it has worked for 4 years without trouble
i haven't changed anything in my site's code
i haven't changed anything at phpthumb
the traffic is the same

why is it causing such high server load?

i think it might be a php setting of some sort...maybe the people at my hoting server changed something (it's a deducated server)


 9:43 am on Oct 23, 2010 (gmt 0)

Can you check the dates of the thumbs? Are they recreated on every request for some reason?


 11:16 am on Oct 23, 2010 (gmt 0)

nope. i'm almost certain the cache works fine.
i'm wondering if it could be a server or php setting of some sort
can you think of anything of this type?


 5:06 pm on Oct 23, 2010 (gmt 0)

make a test php script on the server do

echo get_cfg_var('memory_limit');

what's the memory limit?


 11:19 am on Oct 25, 2010 (gmt 0)

solved it...it was not phpthumb. it was imagemagick and the problem was i had two versions installed on my server

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved