Mail Index


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ApacheGallery] [feature request] Actual caching that lasts through sessions?



On Mon, Aug 23, 2004 at 06:15:43PM -0700, Jake Appelbaum wrote:
> Right. I understand that yet for some reason, it's so slow that it seems
> that it is regenerating all of the images each time.
You could consider putting something like
print STDERR "Scaling $fullpath to file $newfilename\n"
in sub scale_picture inside "if ($scale) {"
to see if the files are being regenerated or not. You could also look
at the file mod times in the cache dir to see if the files are being
regenerated or not.

> Also, when I attempt to link a thumbnail such as :
> /halout-%40theindependent-03-19-04/.cache/100x66-img_0612.jpg in a
> normal IMG tag, after a given amount of time, it seems to expire.
I've been linking directly like this too.

> GalleryCacheDir is set to: /tmp/Apache-Gallery/
IDEA: You have a program that deletes files in tmp if they are over x
days old.

> Unable to scale image
> /var/www/photos.appelbaum.net-data/birthday2004/img_0787.jpg. Are you
> running out of memory? at /usr/local/share/perl/5.6.1/Apache/Gallery.pm
> line 1310.
Seems like it might be worth looking for a pattern of these messages
unless the system is really low on memory due to the huge Apache
processes.

> >  Make sure the
> > apache process has permission to write to the GalleryCacheDir.

> 
> Here's a symptom of the issue:
> 14436 www-data  16   0 86592  15M 73072 S     0.0  6.0   2:17 apache
> 14437 www-data  16   0 79744 8164 73072 S     0.0  3.2   0:10 apache
> 14438 www-data  16   0 85200  13M 73784 S     0.0  5.2   0:29 apache
> 14439 www-data  16   0 80280 9044 73072 S     0.0  3.5   0:06 apache
> 14440 www-data  16   0 78856 7276 73072 S     0.0  2.8   0:17 apache
> 14504 www-data  16   0 82016  10M 73072 S     0.0  4.1   0:11 apache
> 14557 www-data  16   0 85368  13M 73784 S     0.0  5.3   0:23 apache
> 14676 www-data  16   0 95980  23M 73784 S     0.0  9.5   0:35 apache
> 14677 www-data  16   0 79688 8100 73072 S     0.0  3.1   0:12 apache
> 14778 www-data  16   0 78912 7320 73072 S     0.0  2.8   0:01 apache
> 
> Those apache processes with 15M,13M,10M,13M,23M denial of service the
> box. It's directly correlated to users accessing the photo gallery
> (obviously). When any users access the site, it will start to run out of
> memory quickly. If it's caching all of the images correctly, what's the
> deal?
Using lots of memory is /very/ normal for mod_perl. Google for
mod_perl memory for an explanation. Most of the RAM is shared. I have
a Pentium I 133MHz with 32MB RAM running AG with 5 Apache process. The
first load takes a long time, but subsiquent loads (from the cache)
are fairly snappy.

3810 www-data   6   0 12116 7276 3856 S  0.0 23.6   1:45.37 apache2
3815 www-data   7   0  8504 6712 4244 S  0.0 21.8   1:12.20 apache2
3569 www-data   0   0  6964 5156 3732 S  0.0 16.8   0:05.57 apache2


> Why is this happening if the site isn't regenerating the thumbnails?
> 
> And apparently on a personal note you felt the need to say:
> 
> bothered to RTFM. Please don't be so rude simply because you assume I am
> an idiot. When I have waited over a minute to load folders on very fast
> net connections, it's obvious that something is going on between the
> time of the request being made and the results being served up.
You claimed that you would be happy to submit a patch (implying you
are not afraid to read and modify code) but you did not appear to have
looked at the code that is causing you such trouble. You may be well
served to read http://www.catb.org/~esr/faqs/smart-questions.html .


> What's not obvious is what is actually happening.
Certainly not to someone who hasn't looked at the code, but you
offered to patch the code, apparently before you looked at the
relevant section of the source. I certainly would not have been so
rude if I could have thought you are a non-programmer.


Hope the IDEA is right.

Tom

-- 
28 70 20 71 2C 65 29 61 9C B1 36 3D D4 69 CE 62 4A 22 8B 0E DC 3E
mailto:[email protected]
http://thecap.org/
_______________________________________________
users mailing list
[email protected]
http://ufo.hestdesign.com/cgi-bin/mailman/listinfo/agusers