Re: No image creation in mod_perl (was RE: Apache2/MP2 Segfaults ...)

2006-03-28 Thread Clinton Gormley
> This revelation of how Perl does not free up memory it allocates is > worrying, especially as I do process large documents regularly. > > If I read you right, you are saying that $r->child_terminate will force > the current thread to terminate, causing Apache to create a new thread. > Is that

Re: No image creation in mod_perl (was RE: Apache2/MP2 Segfaults ...)

2006-03-27 Thread Foo Ji-Haw
Hey Carl, The only place where forking is useful is where you want something to continue processing after sending the response back to the client. You can achieve the same effective result by calling $r->child_terminate() (assuming your using pre-fork). The currently running child exits at th

RE: No image creation in mod_perl (was RE: Apache2/MP2 Segfaults ...)

2006-03-27 Thread Thomas den Braber
I use Image::Imlib2 for on the fly image creation and it works fine for me. After the thumbnails are created, memory is restored to normal size. Image::Imlib2 is also very vast and easy to code. For filetypes that are not supported by imlib2, I use imagemagick which is using some more memory but

Re: No image creation in mod_perl (was RE: Apache2/MP2 Segfaults ...)

2006-03-27 Thread Jonathan Vanasco
i generally don't like to do that in modperl unless i have enough webservers. i think its a bit of a waste of the mp resource. i do this: on upload, generate a thumbnail w/Image:Epeg (which is a super fast implementation of epeg. previously i compiled my own epeg tools and the perl mod i

Re: No image creation in mod_perl (was RE: Apache2/MP2 Segfaults ...)

2006-03-27 Thread Carl Johnstone
Can you fork off a separate process to do this (that will die once it is completed)? The only place where forking is useful is where you want something to continue processing after sending the response back to the client. You can achieve the same effective result by calling $r->child_terminate(

Re: No image creation in mod_perl (was RE: Apache2/MP2 Segfaults ...)

2006-03-27 Thread Sean Davis
On 3/27/06 6:21 AM, "Tom Schindl" <[EMAIL PROTECTED]> wrote: > Please note that this is not only true for Image-Creation but also if > you are restoring large string contents in a variable (e.g. after > processing a file-upload). > > Tom > > Frank Maas wrote: >> Tom, >> >> >>> As a sidenote

Re: No image creation in mod_perl (was RE: Apache2/MP2 Segfaults ...)

2006-03-27 Thread Tom Schindl
Please note that this is not only true for Image-Creation but also if you are restoring large string contents in a variable (e.g. after processing a file-upload). Tom Frank Maas wrote: > Tom, > > >>As a sidenote often it is not really desired/dangerous to run image >>creation as a mod_perl hand

Re: No image creation in mod_perl (was RE: Apache2/MP2 Segfaults ...)

2006-03-27 Thread Tom Schindl
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 v

No image creation in mod_perl (was RE: Apache2/MP2 Segfaults ...)

2006-03-27 Thread Frank Maas
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