jprieton / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

Is Support offered at all anymore?! -- TimThumb.php eats too much memory just running, not even creating cache #407

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
- What steps will reproduce the problem?
1. asking timThumb for 6 images at the same time on one page

<img 
src="http://host.com/scripts/timthumb.php?src=http://host.com/files/image-e13511
11142717.png&w=319&h=639">
<img 
src="http://host.com/scripts/timthumb.php?src=http://host.com/files/image-e13511
11255265.png&w=319&h=319">
<img 
src="http://host.com/scripts/timthumb.php?src=http://host.com/files/image-e13511
11275243.png&w=639&h=319">
<img 
src="http://host.com/scripts/timthumb.php?src=http://host.com/files/image-e13511
11209501.png&w=319&h=639">
<img 
src="http://host.com/scripts/timthumb.php?src=http://host.com/files/example_mdgf
-e1351111238330.png&w=319&h=319">
<img 
src="http://host.com/scripts/timthumb.php?src=http://host.com/files/image-e13511
11293564.png&w=319&h=319">

2. Images are below 1024x768, PNG, filesize below 600kb.

3. Viewing the broken image doesn't generate a TimThumb error, but shows the 
cached image. (No server usage, direct file loaded)

- What is the expected output? What do you see instead?
All thumbnails show as expected is what I expect, WITHOUT bloating CPU usage to 
100%, and Memory usage to 1Gb (Yes, 1 GigaByte), but I'm seeing broken images 
every other page view. My Server usage then jumps to 100% CPU and 1Gb of memory 
(faulting), and errors in my log file.

(12)Cannot allocate memory: couldn't create child process: 
/opt/suphp/sbin/suphp for /home/host/index.php, referer: http://host.com/

- What version of the product are you using? On what operating system?
Version 2.8.10, Linux shared hosting. Default TimThumb configuration, only 
option altered is MEMORY_LIMIT. It is set to 60M. Server has a limit of 128M.

- Please provide any additional information below.
Why is the script running that much memory? It shouldn't be doing that each 
time it's called. It's like it's re-generating the cache files each time, but 
it's not. 

Also attempted to ask host if Mod_Security was causing issues with this, but 
there was nothing being tripped in their Mod_Security log files.

Here is a verbal Debug log from TimThumb running the images. Please take note 
that the cache already had all 6 images pre-cached.

Is it possible the script is being called before the Garbage Collector can wipe 
the memory free, thus adding more to the memory?

Original issue reported on code.google.com by cryss.mc...@gmail.com on 25 Oct 2012 at 3:20

Attachments:

GoogleCodeExporter commented 8 years ago
I have the same problem! How fix this?

Original comment by w...@jonathanmartins.com.br on 20 May 2013 at 8:55

GoogleCodeExporter commented 8 years ago
I have the same issue and the site is crashing.
http://photobr.org/
Hosted with GoDaddy (yes... I know).
They are telling me that starting 6 simultaneous system processes is too many. 
And that is the problem.
In fact, at times I see as many as 21.
Using 2.8.10.
Debug log is similar to that of  Cryss.Mc.
Love TimThumb, but can't use it if it uses too much memory and crashes the site.
Is there any way to lessen the memory load?
Reduce the system processes?

Original comment by bruce.no...@gmail.com on 1 Oct 2013 at 1:18

Attachments: