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, 2004-08-23 at 17:07, Tom Brown wrote:
> On Mon, Aug 23, 2004 at 04:05:34PM -0700, Jake Appelbaum wrote:
> > know why it's slow (my photos are 3 megs each). But After a single
> > person loads the page, the major work has been done, why not keep it?

> AG does cache, and has since at least 0.2.

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. I could be entirely
wrong, and access times show that to be the case, but it's so slow that
it's unusable by many people.

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.

For a while, it works but a week later or something, people point me
back to the img tag being broken. That could be a different issue, but
it seems tied together.

>  Look at GalleryCacheDir in
> the README. Make sure you have pointed it someone sensible.

I do.

GalleryCacheDir is set to: /tmp/Apache-Gallery/

Which on this server is entirely sensible.
If you want the rest of the vhost config for apache, I am able to reply
with it. 

>  Try
> looking in it.

I have. It has some cached files, as it should.

>  Look in the apache error log for errors.

A few things that have turned up in the error logs are:

[Mon Aug  9 12:43:40 2004] [info] [client x.x.x.x] (32)Broken pipe:
client stopped connection before rwrite completed

[Tue Aug 10 10:23:37 2004] [info] [client x.x.x.x] (104)Connection reset
by peer: client stopped connection before rwrite completed

[Sat Jul 17 02:02:13 2004] [error] Can't call method "get_width" on an
undefined value at /usr/local/share/perl/
5.6.1/Apache/Gallery.pm line 1320.

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.

[Sat Jul 17 02:02:13 2004] [error] Can't call method "get_width" on an
undefined value at /usr/local/share/perl/
5.6.1/Apache/Gallery.pm line 1320.

[Mon Aug  2 09:10:49 2004] [info] [client x.x.x.x] mod_perl:
Apache->print timed out

[Sun Aug 22 02:12:02 2004] [info] [client x.x.x.x] (104)Connection reset
by peer: client stopped connection before send mmap completed

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

It does. There are some of the files in the directory.

 ls -al /tmp/Apache-Gallery/ |head -n4
total 161
drwxr-xr-x   29 www-data www-data     1016 Jun 18 02:48 .
drwxrwxrwt    3 root     root          152 Aug 23 17:27 ..
drwxr-xr-x    2 www-data www-data     2448 May 28 10:21
1-year-aniversary-protesting-war-on-iraq

 ls -al /tmp/Apache-Gallery/1-year-aniversary-proteesting-war-on-iraq/
|head -n4

total 904
drwxr-xr-x    2 www-data www-data     2448 May 28 10:21 .
drwxr-xr-x   29 www-data www-data     1016 Jun 18 02:48 ..
-rw-r--r--    1 www-data www-data     3110 May  9 21:41
100x66-img_0618.jpg


>  Include
> copy and paste from error log, dir -l, etc as appropriate if you are
> still having trouble and need more help.

Without any changes, I am still having trouble with this enabled feature

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?

Why is this happening if the site isn't regenerating the thumbnails?

And apparently on a personal note you felt the need to say:

> I hope that while you were typing your rather verbose message that you
> thought "Gosh, caching is /such/ an obvious feature. Why on earth is it
> not implemented or does not seem to work for me?"

I hope while you were typing your reply, you stopped to think about how
you appear when you end on such a hostile note.

The software doesn't seem to be working correctly and I have actually
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.

What's not obvious is what is actually happening.

There is a problem/bug/issue here, because it doesn't work correctly 99%
of the time. It eats up too much memory for production use and it's
slow.

Either way, thanks for the reply. I am still under the impression that
something is wrong and it's not in my configuration.

I was wrong to assume that the caching function wasn't there, but if it
is and it's this slow, perhaps something (as I stated above) is wrong?

-- 
Jake Appelbaum <[email protected]>

_______________________________________________
users mailing list
[email protected]
http://ufo.hestdesign.com/cgi-bin/mailman/listinfo/agusers