Re: redirect

2007-10-16 Thread Mark Maunder
Hi, I may have missed some data earlier in this thread but, a few questions: It sounds like you're trying to use a mod_perl handler to read the location header from the client? Why are you doing this if your objective is to redirect the client to another page. Shouldn't you be sending the client

redirect

2007-10-16 Thread neelike
Hi Perrin Thanks for your reply. We are getting some responses from a html page and filtering the content accoding to our requirement. Through mozilla(Live HTTP Headers), we used to check the location headers. We need to redirect the location to some other page. we need to display the locatio

Re: Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Mark Maunder
This server has no proxy in front of it and only serves mod_perl requests. Static content is loaded from another server with a different hostname. I had keepalive enabled with a 2 second timeout on this server until a few seconds ago. Now before you rake me over the coals, I _thought_ that when I d

Re: Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Perrin Harkins
On 10/16/07, Mark Maunder <[EMAIL PROTECTED]> wrote: > Mornings are the busiest for us, so the following is not during peak. > This is my current mod_status: > 39.4 requests/sec - 114.4 kB/second - 2976 B/request > 80 requests currently being processed, 170 idle workers Do you have a proxy server

Re: Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Perrin Harkins
On 10/16/07, Mark Maunder <[EMAIL PROTECTED]> wrote: > I've benchmarked sqlite and it's a lot slower than my home rolled > routines - mostly because of the intensive read/write/update/delete > activity. SQLite is a typically slower than MySQL if you run the MySQL server on the same host (so it can

Re: Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Mark Maunder
Hi Perrin, Thanks so much for the quick reply. I've commented your original email below: On 10/16/07, Perrin Harkins <[EMAIL PROTECTED]> wrote: > On 10/16/07, Mark Maunder <[EMAIL PROTECTED]> wrote: > > My mod_perl app works with some fairly > > large data structures and AFAIK perl doesn't like t

Re: Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Mark Maunder
Thanks Michael, All my modules are in startup.pl. I've moved away from mysql because it was too slow for my purposes and I have the equivalent of thousands of small tables. So I'm using my own file access methods with flock() with read/write locking. It's very fast, but the down side is I need to

Re: Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Michael Peters
Boysenberry Payne wrote: > $Apache2::SizeLimit::MAX_UNSHARED_SIZE = 5; The key here is your unshared memory. On Linux COW takes care of all the stuff you pre-load and then don't change on prefork. But if you're constantly changing large data structures, then prefork won't really work for you

Re: Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Boysenberry Payne
I use in my start.pl: use Apache2::SizeLimit (); $Apache2::SizeLimit::CHECK_EVERY_N_REQUESTS = 5; $Apache2::SizeLimit::MAX_UNSHARED_SIZE = 5; It might allow you to use prefork MPM without worrying so much about too much memory being taken. -bop On Oct 16, 2007, at 2:39 PM, Mark Maunde

Re: Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Perrin Harkins
On 10/16/07, Mark Maunder <[EMAIL PROTECTED]> wrote: > My mod_perl app works with some fairly > large data structures and AFAIK perl doesn't like to free memory back > to the OS once it's allocated it, so the processes tend to grow for > the first few hours of the server being up and then the plate

Re: Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Mark Maunder
Also, just some additional data for the archives and discussion: It seems (in my case) that prefork is much more memory hungry than worker. Here are the details: I switched to a prefork model from worker MPM. As I mentioned before my load avg seemed to drop, but memory usage went up. It continued

Re: Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Mark Maunder
Thanks guys. I assumed worker would save me memory because threads are light(er)weight. I'm busy trying prefork now and my load avg seems to have dropped slightly, but my memory usage seems to have gone up somewhat. Just read your comments in the archives on copy-on-write Perrin - I had no idea it

Re: Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Perrin Harkins
On 10/16/07, Clinton Gormley <[EMAIL PROTECTED]> wrote: > Unless you have a really good reason to use worker, on linux, the > recommended MPM is worker. I'm sure you meant to say prefork there. And I agree, if you're concerned about memory, don't use threads. Prefork will save you memory because

Re: Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Clinton Gormley
Hi Mark I don't know what the issue is, but do you really need to use threads? Why not just use the prefork MPM? It is more efficient than the worker MPM on linux, and may ("may" being a complete guess) be the source of your troubles. Unless you have a really good reason to use worker, on linux,

Mod_Perl and MaxRequestsPerChild

2007-10-16 Thread Mark Maunder
Hi All, I have a high traffic mod_perl2 web server (40 requests/second and all are dynamic data - no images or static html) and I have a slow memory leak in mod_perl2. I haven't tracked the leak down yet, but to deal with it I have set MaxRequestsPerChild to 5000. I'm using the worker MPM with the

Re: location header

2007-10-16 Thread Perrin Harkins
On 10/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > when i put warn command after the life to fetch the > $location value,It doesn't yield any value. > my $location = $r->headers_out->get('Location'); There won't be anything there unless you put something there. What are you trying to d

ANNOUNCE: XS-based minifiers for JS/CSS

2007-10-16 Thread Graham TerMarsch
After receiving some feedback from people about my Apache2 auto-minification filters for JS/CSS, and seeing that the only issue people seemed to have was that the underlying minifiers weren't terribly fast, I've gone ahead and have rebuilt them using XS. I've also updated the Apache2 filters th

Re: Test Server

2007-10-16 Thread Issac Goldstand
I've had amazing experience setting up development sandboxes with VMWare Workstation and deploying them on Player (which means less investment in licenses). I use MySQL replication from the live server for keeping the DBs in sync and SVN for file management. If I've got people who use win32 as th