perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Schindl <tomAtLi...@gmx.at>
Subject Re: No image creation in mod_perl (was RE: Apache2/MP2 Segfaults ...)
Date Mon, 27 Mar 2006 11:19:55 GMT
Well image creation in mod_perl is not a bad idea if you ensure that the
process is killed after it succeeded a certain memory. The problem in
case of mod-perl/httpd is that that if every httpd-process is eating 20
MB of space only because you have created once an image. You must ensure
that only very view processes of your apache are used to create images
and /me thinks this could be accomplished best using the following setup.

1. light-weight httpd to server static content
2. mod-perl enabled httpd to serve dynamic content beside images
3. mod-perl enabled httpd to server images with few processes (e.g.
MaxChild 5). This ensures that you can answer 5 image creation request
simultaneously but your system will never use more than 100 MB to create
images.

If your system is not stressed heavily 1 and 3 could be run in one server.

Tom

Frank Maas wrote:
> Tom,
> 
> 
>>As a sidenote often it is not really desired/dangerous to run image
>>creation as a mod_perl handler because of the nature of perl, memory
>>allocated once is never freed until the process shutdowns or is killed
>>(by your Apache::SizeLimit handler).
> 
> 
> Ah, you got me worried there... How in your opinion should one do creation of images
in a mod_perl environment. Think of captcha's, on-the-fly images, etc.?
> 
> I am very interested to hear opinions about this (just before I am going to use this
heavily ;-).
> 
> Regards,
> Frank
> 
> 


Mime
View raw message