RedHat 7.0 and mod-perl
Is anyone using mod-perl with apache-1.3.14 on RedHat 7.0? Any complaints? Jamie Krasnoo
Re: Apache::SizeLimit for unshared RAM ???
On Mon, 8 Jan 2001, Joshua Chamas wrote: Hey, I like the idea of Apache::SizeLimit, to no longer worry about setting MaxRequestsPerChild. That just seems smart, and might get maximum usage out of each Apache child. What I would like to see though is instead of killing the child based on VmRSS on Linux, which seems to be the apparent size of the process in virtual memory RAM, I would like to kill it based on the amount of unshared RAM, which is ultimately what we care about. It exists for a long time: Apache::GTopLimit. Of course if you have GTop. And it's in the guide including all the calculations of the real memory used (used by Apache::VMonitor) Here's why: any time I add a new module to the code base, I am going to grow the RAM of all processes when I preload them with PerlModule or use in startup.pl, but I DON'T CARE about those, because they are shared, right? Problem is I do care because I have to retweak the Apache::SizeLimit every time my code base grows, because my RAM of each process just grew at the post fork baseline. I guess you could say, SO WHAT!, get over it, but it seems like there should be a better way. * Dreamy * -- Josh _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Apache::SizeLimit for unshared RAM ???
What I would like to see though is instead of killing the child based on VmRSS on Linux, which seems to be the apparent size of the process in virtual memory RAM, I would like to kill it based on the amount of unshared RAM, which is ultimately what we care about. We added that in, but haven't contributed a patch back because our hack only works on Linux. It's actually pretty simple, since the data is already there on Linux and you don't need to do any special tricks with remembering the child init size. If you think it would help, I'll try to get an okay to release a patch for it. This is definitely a better way to do it than by setting max size or min shared size. We had a dramatic improvement in process lifespan after changing it. - Perrin
Re: Apache::SizeLimit for unshared RAM ???
Perrin Harkins wrote: We added that in, but haven't contributed a patch back because our hack only works on Linux. It's actually pretty simple, since the data is already there on Linux and you don't need to do any special tricks with remembering the child init size. If you think it would help, I'll try to get an okay to release a patch for it. This is definitely a better way to do it than by setting max size or min shared size. We had a dramatic improvement in process lifespan after changing it. I would like to see this, but how is it better than the min shared size of Apache::GTopLimit ... I'm feeling a bit slow to be missing this point. On the other hand, it seems nice to NOT HAVE to install libgtop for this feature, as Apache::SizeLimit is just a raw perl module. Sometimes when you are trying to get things right, the less new code the better! -- Josh
Apache::SIG kills the process
I was rewriting the detecting 'STOP' button pressed section in the guide, to notice that Apache::SIG kills the process under Apache::Registry. httpd.conf: PerlFixupHandler Apache::SIG test script: use strict; my $r = shift; $r-send_http_header('text/plain'); print("PID = $$\n"); $r-rflush; while(1){ $r-print("\0"); $r-rflush; sleep 1; } 'STOP' pressed: alarm(300) = 0 alarm(0)= 300 write(3, "\0", 1) = 1 time([979032041]) = 979032041 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({1, 0}, {1, 0}) = 0 time([979032042]) = 979032042 alarm(300) = 0 alarm(0)= 300 write(3, "\0", 1) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) --- getppid() = 5957 write(3, "\0", 1) = -1 EPIPE (Broken pipe) rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGPIPE (Broken pipe) --- getppid() = 5957 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 select(4, [3], NULL, NULL, {0, 0}) = 1 (in [3], left {0, 0}) time(NULL) = 979032042 write(17, "127.0.0.1 - - [09/Jan/2001:10:20"..., 92) = 92 gettimeofday({979032042, 716786}, NULL) = 0 times({tms_utime=43, tms_stime=5, tms_cutime=0, tms_cstime=0}) = 14540116 close(3)= 0 rt_sigaction(SIGUSR1, {0x8099524, [], SA_INTERRUPT|0x400}, {SIG_IGN}, 8) = 0alarm(0)= 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigaction(SIGALRM, {0x8098168, [], SA_RESTART|0x400}, {0x8098168, [], SA_INTERRUPT|0x400}, 8) = 0 rt_sigaction(SIGHUP, {SIG_IGN}, {0x80994f8, [], SA_INTERRUPT|0x400}, 8) = 0 rt_sigaction(SIGUSR1, {SIG_IGN}, {0x8099524, [], SA_INTERRUPT|0x400}, 8) = 0rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 munmap(0x40014000, 4096)= 0 _exit(0)= ? CORE::exit is called internally and the process quits. The trace was run under httpd -X, but the same happens with normal setup. Apache/1.3.14 (Unix) mod_perl/1.24_02-dev perl5.6.0 linux (k2.2.17) Ideas? Thanks! _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: RedHat 7.0 and mod-perl
Jamie Krasnoo wrote: Is anyone using mod-perl with apache-1.3.14 on RedHat 7.0? Any complaints? Me, core dumps. I recompiled perl_5.005_03 ,apache_1.3.12, mod_perl-1.24 and now it works: $ perl -v This is perl, version 5.005_03 $ telnet localhost 80 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. HEAD / HTTP1/0 HTTP/1.1 200 OK Date: Tue, 09 Jan 2001 10:18:21 GMT Server: Apache/1.3.12 (Unix) mod_perl/1.24 -- - frankie -
RE: RedHat 7.0 and mod-perl
there were some problem reports when 7.0 was first released - I don't think any of those resulted in resolutions sent to the list... from what I've heard, the gcc that ships with 7.0 had some real problems - I dunno the current status, though... --Geoff -Original Message- From: Jamie Krasnoo [mailto:[EMAIL PROTECTED]] Sent: Monday, January 08, 2001 7:21 PM To: Modperl Subject: RedHat 7.0 and mod-perl Is anyone using mod-perl with apache-1.3.14 on RedHat 7.0? Any complaints? Jamie Krasnoo
Adding a mod_perl / handler gives odd SCRIPT_NAME and PATH_INFO...
We are working on a dynapage engine that can be operated under mod perl. The system works well when ran under configuration such as Location /pgc SetHandler perl-script PerlHandler PGC:;Handler /Location however when we try to use Location / SetHandler perl-script PerlHandler PGC:;Handler /Location we hit a problem. See the following URls and CGI envs... Url SCRIPT_NAME PATH_INFO --- --- / / / // / / //bbb / /bbb for the folowing config Location / SetHandler perl-script PerlHandler PGC:;Handler /Location we get pretty similar CGI envs The problem is that we expect everything after / to be part of PATH_INFO - from the CGI env it is not possible to tell if we are trying to exclude / from the dynamic part of the URL or whether Apache/mod_perl has decided to moe this part of the URl into the script name. Any suggestions are welcome. FYI: we have currently modified the sstem to include our own TransHandler however for various reasons this is not an ideal solution... Jacqui
Re: mod-perl on Solaris 2.6
You wrote: Date: Tue, 9 Jan 2001 00:16:46 +0530 To: [EMAIL PROTECTED] From: "Siddhartha Jain" [EMAIL PROTECTED] Subject: Re: mod-perl on Solaris 2.6 Message-ID: 00c201c079a3$5a678de0$1a01010a@Sid Applying patches was the first thing i did after installing the OS (kind of a standard practise with me). So, yes everything i've done has been after installing the patches. Siddhartha --- Hmmm Is uselargefiles enabled under Perl? mod_perl and Apache do not like uselargefiles under Solaris - this is a known bug. What does perl -V (that's a capital V) say? I had this same problem, but when I manually set uselargefiles=false - the compile and test afterwards was successful
Segmentation fault in apache child when calling DBI::connect
Hi, I use apache1.3.12 with mod_perl 1.24 and I've been using it in several programs with DBI (version 1.13). This is the first time I get an error like this, other programs that uses DBI are still working. In command line everything is working ok, but when I run my program under mod_perl, I get no data (not even headers), and the only message in the error log (with LogLevel debug) is this: [Tue Jan 9 09:40:54 2001] [notice] child pid 28932 exit signal Segmentation fault (11) I've debugged everything and discovered that the error occurs when I call DBI-connect. I debbuged DBI.pm and DBD/mysql.pm and found that the error happens in the following line, in DBD::mysql (version 2.0402): DBD::mysql::db::_login($this, $dsn, $username, $password) or $this = undef I've tried also to connect to different databases in different servers, but the error persists. Does anyone have any idea of how to solve this? Thanks a lot. []s Luis
[JOB WANTED]: Boston area modperl contract
I'm looking for Boston area companies, or possibly something that can be done on a telecommuting basis, requiring expertise with perl (modperl) and apache in a large-scale environment. I've got some pretty good experience using modperl, please email me for a resume. I'm mainly targeting contract work, but would be interested in talking about a full time position if an interesting opportunity arises. Interested parties please email me off list. =-=-=-=-=-=-=-=-=-=- My God! What have I done? -=-=-=-=-=-=-=-=-=-= Steve Reppucci [EMAIL PROTECTED] | Logical Choice Software http://logsoft.com/ |
RE: Adding a mod_perl / handler gives odd SCRIPT_NAME and PATH_INFO...
-Original Message- From: Jacqui Caren [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 09, 2001 8:06 AM To: Mod Perl Cc: Oliver Taylor; Jacqui Caren Subject: Adding a mod_perl / handler gives odd SCRIPT_NAME and PATH_INFO... The problem is that we expect everything after / to be part of PATH_INFO - from the CGI env it is not possible to tell if we are trying to exclude / from the dynamic part of the URL or whether Apache/mod_perl has decided to moe this part of the URl into the script name. Any suggestions are welcome. rewrite requests to / or /index.html to your working Location /pgc - that will keep your dynamic stuff looking like it came from / FYI: we have currently modified the sstem to include our own TransHandler however for various reasons this is not an ideal solution... if you are already writing your own trans handler, you'll benefit from setting PerlSetupEnv Off and getting $r-path_info yourself instead of gleaning it from %ENV... HTH --Geoff Jacqui
Re: RedHat 7.0 and mod-perl
Jamie Krasnoo wrote: Is anyone using mod-perl with apache-1.3.14 on RedHat 7.0? Any complaints? Francesc Guasch wrote: Me, core dumps. - Well, I'm trying to as well. I have: RedHat 7.0 Apache-1.3.14 Perl-5.6.0 mod_perl-1.24_01 Berkeley-3.1 (seemed required to get Sendmail 8.11.1 working). From what I read at the apache.org site, one needs to have Apache 2.0+ in order to run Berkeley 3.1, so I'm trying to compile mod_perl without the DB. I'm currently receiving an error #29 with modules/src.t in the make test phase. Please don't tell me I'm so close to the bleeding edge that I'm going to get all bloody Story of my life (P.S. Maybe someone has already posted a cure since my post of last night but I haven't checked all mail as of yet. I'll keep my fingers crossed). Andrew Lietzow Plantsman Wannabe Hacker?
Re: Adding a mod_perl / handler gives odd SCRIPT_NAME and PATH_INFO...
Jacqui Caren ([EMAIL PROTECTED]) said something to this effect on 01/09/2001: Location /pgc SetHandler perl-script PerlHandler PGC:;Handler ^ /Location * snip * Location / SetHandler perl-script PerlHandler PGC:;Handler ^ /Location * snip * Location / SetHandler perl-script PerlHandler PGC:;Handler ^ /Location Are these typos in your email or your config? (darren) -- The world is coming to an end! Repent and return those library books!
Re: mod-perl on Solaris 2.6
Hi, Finally, i have it working. Thanks to all those who replied. Although, i still don't know the exact cause of the previous failures but i suspect it was threaded perl builds cause some debugging thru' gdb shows something related to threads. Unfortunately, i deleted the debug dump. Anyway, here are the changes i made while making perl :- 1. Used Solaris tools (NO GNU binutils) 2. Disabled largefiles support 3. Disabled threads I tried with using Solaris tools and enabling largefile support and threads but it didn't work, so the culprit has to be largefile support or threads. Since threads is an experimental feature, i figured it must be the culprit. Whatever, thanks everyone. Siddhartha Jain - Original Message - From: "JONES, WILLIAM C" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 09, 2001 7:18 PM Subject: Re: mod-perl on Solaris 2.6 You wrote: Date: Tue, 9 Jan 2001 00:16:46 +0530 To: [EMAIL PROTECTED] From: "Siddhartha Jain" [EMAIL PROTECTED] Subject: Re: mod-perl on Solaris 2.6 Message-ID: 00c201c079a3$5a678de0$1a01010a@Sid Applying patches was the first thing i did after installing the OS (kind of a standard practise with me). So, yes everything i've done has been after installing the patches. Siddhartha -- -- --- Hmmm Is uselargefiles enabled under Perl? mod_perl and Apache do not like uselargefiles under Solaris - this is a known bug. What does perl -V (that's a capital V) say? I had this same problem, but when I manually set uselargefiles=false - the compile and test afterwards was successful
Re: Adding a mod_perl / handler gives odd SCRIPT_NAME and PATH_INFO...
On Tue, 9 Jan 2001 10:45:11 -0500, darren chamberlain wrote: Jacqui Caren ([EMAIL PROTECTED]) said something to this effect on 01/09/2001: Location /pgc SetHandler perl-script PerlHandler PGC:;Handler ^ /Location * snip * Location / SetHandler perl-script PerlHandler PGC:;Handler ^ /Location * snip * Location / SetHandler perl-script PerlHandler PGC:;Handler ^ /Location Are these typos in your email or your config? my email - never try and compose email with a migraine :-) The handler works - the problem is that for location / we do not get the rest of the URL as PATh info but the next component of the URL becomes SCRIPT_NAME instead. The location() method example at http://www.modperl.com/book/chapters/ch9.html#Server_Core_Functions probably does what we require - I will try this and see if it can be used to workaround this 'feature' of apache. Thanks, Jacqui
RE: RedHat 7.0 and mod-perl
I have one problem that realy is more of an annoyance than a threat. I've mentioned it before and realy got no solutions as to why this happens. On RedHat 7.0 when I have mod_perl-1.24_01 compiled in to apache-1.3.14 and have a PerlRequire set to startup.pl. It (startup.pl) seems to get run twice. I have dynamic subroutines loading up on startup so the init gets run twice when it starts. It doesn't damage anything when it happens but this problem only seems to happen with RedHat 7.0 and its an updated version of it too. Could be that the glibc is still funky after putting in the new rpm but its realy weird. One other thing is that when a stale pid file is present it seems to only run the startup file once, super weird. Not sure why it does this since I don't get this with any of the other Linux distros or earlier RH distros (6.2 on down seems to behave just fine). Jamie -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 09, 2001 2:19 AM To: Jamie Krasnoo Cc: Modperl Subject: Re: RedHat 7.0 and mod-perl Jamie Krasnoo wrote: Is anyone using mod-perl with apache-1.3.14 on RedHat 7.0? Any complaints? Me, core dumps. I recompiled perl_5.005_03 ,apache_1.3.12, mod_perl-1.24 and now it works: $ perl -v This is perl, version 5.005_03 $ telnet localhost 80 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. HEAD / HTTP1/0 HTTP/1.1 200 OK Date: Tue, 09 Jan 2001 10:18:21 GMT Server: Apache/1.3.12 (Unix) mod_perl/1.24 -- - frankie -
RE: RedHat 7.0 and mod-perl
Hi there, On Tue, 9 Jan 2001, Jamie Krasnoo wrote: (startup.pl) seems to get run twice. Isn't this mentioned in the Guide? 73, Ged.
RE: PerlAccessHandler Question...
#Location Handlers Location PerlAccessHandler Apache::GateKeeper /Location The Location directive needs to specify a URL to which it applies: Location / Perl*Handlers can go pretty much anywhere, as long as the server administrator hasn't diabled .htaccess files. perl.conf will work. httpd.conf will work. Hope that helps. Chris
Re: Apache::SizeLimit for unshared RAM ???
On Tue, 9 Jan 2001, Joshua Chamas wrote: Perrin Harkins wrote: We added that in, but haven't contributed a patch back because our hack only works on Linux. It's actually pretty simple, since the data is already there on Linux and you don't need to do any special tricks with remembering the child init size. If you think it would help, I'll try to get an okay to release a patch for it. This is definitely a better way to do it than by setting max size or min shared size. We had a dramatic improvement in process lifespan after changing it. I would like to see this, but how is it better than the min shared size of Apache::GTopLimit It's like this: What you want to control is the maximum REAL memory that each process will take. That's not max size or min shared, it's max unshared. If you try to control this using the traditional max size and min shared settings, processes often get killed too soon because it's hard to predict how much of the max size will be shared in any given child. Doing it this way also means you never have to adjust the settings when you add in or remove modules. The thing you care about - how much actual RAM is used perprocess - is constant. On the other hand, it seems nice to NOT HAVE to install libgtop for this feature, as Apache::SizeLimit is just a raw perl module. That's the main drawback to GTopLimit. - Perrin
Re: PerlAccessHandler Question...
Hi there, On Tue, 9 Jan 2001, Joseph Crotty wrote: open(FILE, "/tmp/dog"); Always check the status returned by a call like open(). 73, Ged.
RE: PerlAccessHandler Question...
Good advice Ged. I figured out the problem...there was another server running on the port almost exactly like the one I was using, but without the PerlAccessHandler. Huge brain fart. I need a nap. -Original Message- From: G.W. Haywood [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 09, 2001 11:44 AM To: Joseph Crotty Cc: '[EMAIL PROTECTED]' Subject: Re: PerlAccessHandler Question... Hi there, On Tue, 9 Jan 2001, Joseph Crotty wrote: open(FILE, "/tmp/dog"); Always check the status returned by a call like open(). 73, Ged.
[DIGEST] mod_perl digest 01/01/2001
-- mod_perl digest January 1, 2001 - January 6, 2001 -- Recent happenings in the mod_perl world... Features o mod_perl status o cvs patches o module announcements o mailing list highlights o links mod_perl status o mod_perl - stable: 1.24_01 (released October 10, 2000) [1] - development: 1.24_02-dev [2] o Apache - stable: 1.3.14 (released October 13, 2000) [3] - development: 1.3.15-dev [4] o Perl - stable: 5.6 (released March 23, 2000) [5] - development: 5.7 [6] cvs patches o fix Apache::PerlRun is-a - has-a Apache relationship change oversight [7] o fix $r subclassing mechanism when value of `r' or `_r' key is a hashref [8] module announcements o Apache-ProxyRewrite 0.10 - a reverse-proxy that will rewrite URLs embedded in HTML documents per apache configuration directives [9] o HTML::Mason 0.896 - allows web pages and sites to be constructed from shared, reusable building blocks called components, which contain a mix of Perl and HTML and can call each other and pass values back and forth like subroutines [10] mailing list highlights o Here are tips on helping to get around 'User Pressed Submit Twice' problems, [11] [12] including code for a quick Javascript solution [13] o Did you know that $r-document_root is writable? [14] o Some tips on securing a front-end back-end proxy setup [15] o More proxy talk - this time on getting those tricky mod_rewrite rules right [16] [17] o Linux Hello World 2000 benchmark results are in [18] o Doug added quite a bit of documentation this week to the 2.0 development tree. - 2.0 overview [19] - 2.0 design [20] links o The Apache/Perl Integration Project [21] o mod_perl documentation [22] o mod_perl modules on CPAN [23] o mod_perl homepage [24] o mod_perl news and advocacy [25] o mod_perl list archives [26] [27] happy mod_perling... --Geoff [EMAIL PROTECTED] -- [1] http://perl.apache.org/dist/ [2] http://perl.apache.org/from-cvs/modperl/ [3] http://www.apache.org/dist/ [4] http://dev.apache.org/from-cvs/apache-1.3/ [5] http://www.perl.com/pub/language/info/software.html#stable [6] http://www.perl.com/pub/language/info/software.html#devel [7] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=97867331327427w=2 [8] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=97867366827849w=2 [9] http://forum.swarthmore.edu/epigone/modperl/spoushalband [10] http://forum.swarthmore.edu/epigone/modperl/mogrugli [11] http://forum.swarthmore.edu/epigone/modperl/skunqualchon [12] http://forum.swarthmore.edu/epigone/modperl/relddanshi [13] http://forum.swarthmore.edu/epigone/modperl/boirimshox/5.0.0.25.2.2001010509 [EMAIL PROTECTED] [14] http://forum.swarthmore.edu/epigone/modperl/breldskahsang [15] http://forum.swarthmore.edu/epigone/modperl/yendstilmul [16] http://forum.swarthmore.edu/epigone/modperl/smingswoupril [17] http://forum.swarthmore.edu/epigone/modperl/zhaxkhandblend [18] http://forum.swarthmore.edu/epigone/modperl/sercrerdprou [19] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=97846563515032w=2 [20] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=97846518913900w=2 [21] http://perl.apache.org [22] http://perl.apache.org/#docs [23] http://www.cpan.org/modules/by-module/Apache/ [24] http://www.modperl.com [25] http://www.take23.org [26] http://forum.swarthmore.edu/epigone/modperl/ [27] http://marc.theaimsgroup.com/?l=apache-modperlr=1w=2
RE: Apache::SizeLimit for unshared RAM ???
I like the idea of Apache::SizeLimit, to no longer worry about setting MaxRequestsPerChild. That just seems smart, and might get maximum usage out of each Apache child. What I would like to see though is instead of killing the child based on VmRSS on Linux, which seems to be the apparent size of the process in virtual memory RAM, I would like to kill it based on the amount of unshared RAM, which is ultimately what we care about. It exists for a long time: Apache::GTopLimit. Of course if you have GTop. And it's in the guide including all the calculations of the real memory used (used by Apache::VMonitor) So, forgive me for not "getting it," but is there a way to do this without endless retries and experimentation? It seems to me that blocking on a per-child size usage is silly (even tho I'm shure it's what is available at the programming level). I mean, I have a machine w/ 512MB of ram. unload the webserver, see that I have, say, 450MB free. So I would like to tell apache that it is allowed to use at most 425MB. It's not out there as far as I can find. So far all I've been able to find is: Run your service for awhile. Do some math and guesswork about size/totals/available. Run it again. Recheck your math. Use (per-process limiting module). Pray that your processes never grow because of rarely used functionality/peak usage/larger than usual queries ... because then all of your hard work before goes RIGHT out the window, and I'm talking about a 10-15 MB difference between JUST FINE and DEATH SPIRAL, because we've now just crossed that horrible, horrible threshold of (say it quietly now) swapping! shudder Have I jumped to the wrong conclusion? Is there a module (or usage) I've missed? Somehow I doubt I'm the only one who sees the problem in these terms... has anybody seen the SOLUTION in these terms?? L8r, Rob
Re: Apache::SizeLimit for unshared RAM ???
IMHO, he has a point. I'd also benefit from memory usage based upon an application threshold. He has a good idea... Rob Bloodgood wrote: I have a machine w/ 512MB of ram. unload the webserver, see that I have, say, 450MB free. So I would like to tell apache that it is allowed to use at most 425MB. L8r, Rob -- www.RentZone.org
RE: Apache::SizeLimit for unshared RAM ???
On Tue, 9 Jan 2001, Rob Bloodgood wrote: I like the idea of Apache::SizeLimit, to no longer worry about setting MaxRequestsPerChild. That just seems smart, and might get maximum usage out of each Apache child. What I would like to see though is instead of killing the child based on VmRSS on Linux, which seems to be the apparent size of the process in virtual memory RAM, I would like to kill it based on the amount of unshared RAM, which is ultimately what we care about. It exists for a long time: Apache::GTopLimit. Of course if you have GTop. And it's in the guide including all the calculations of the real memory used (used by Apache::VMonitor) So, forgive me for not "getting it," but is there a way to do this without endless retries and experimentation? It seems to me that blocking on a per-child size usage is silly (even tho I'm shure it's what is available at the programming level). I mean, I have a machine w/ 512MB of ram. unload the webserver, see that I have, say, 450MB free. So I would like to tell apache that it is allowed to use at most 425MB. It's not out there as far as I can find. So far all I've been able to find is: Run your service for awhile. Do some math and guesswork about size/totals/available. Run it again. Recheck your math. Use (per-process limiting module). Pray that your processes never grow because of rarely used functionality/peak usage/larger than usual queries ... because then all of your hard work before goes RIGHT out the window, and I'm talking about a 10-15 MB difference between JUST FINE and DEATH SPIRAL, because we've now just crossed that horrible, horrible threshold of (say it quietly now) swapping! shudder Have I jumped to the wrong conclusion? Is there a module (or usage) I've missed? Somehow I doubt I'm the only one who sees the problem in these terms... has anybody seen the SOLUTION in these terms?? it's all explained here: http://perl.apache.org/guide/performance.html#Choosing_MaxClients Using GTopLimit you delimit the upper and lower memory boundaries, which allows you to calculate the optimal MaxClients for a given memory size. And it'll never go over this size (well may be for a few secs for a few MBs if the process is still running, since the killing happens at the end of the request). _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
RE: How do you run libapreq-0.31/eg/perl/file_upload.pl
Hi, well, almost... either change that to a Files directive or remove the filename from the Location directive, so that Apache::Request applies to all scripts within cgi-bin... see http://perl.apache.org/guide/config.html for more details... thank you for your reply. I have changed Files to Location and also moved the file_upload.pl into /cgi-perl/ to avoid any collisions with the settings of the /cgi-bin/ directory: PerlWarn On Alias /cgi-perl/ /var/www/cgi-perl/ Location /cgi-perl/ SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI #PerlSendHeader On /Location However I have this strange problem now: the web page doesn't change until I reload it. (Un)commenting "PerlSendHeader On" doesn't help. The only ways to see the expected results (like the initial empty web form, when entering http://localhost/cgi-perl/file_upload.pl into my Netscape 4.7) is to keep reloading or to go to the Edit-Preferences- Advanced-Cache and swith "Every Time" on. I am using OpenBSD 2.8 with the native Apache 1.3.12 and Perl 5.6.0 and the mod_perl 1.24 from its ports at home and I have the same problem with Apache 1.3.14/Perl 5.6.0/mod_perl 1.24_01 installed in my home dir at work - on a Solaris 2.6/Sparc workstation. I decided to ask on this list first, before following the instructions at http://perl.apache.org/guide/debug.html because nothing seems to be broken - there is just something wrong with headers or similar... I probably miss something obvious... Here's what I get when telnetting: alex:alex {105} telnet localhost 80 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET /cgi-perl/file_upload.pl HTTP/1.1 Host: localhost HTTP/1.1 200 OK Date: Tue, 09 Jan 2001 20:09:42 GMT Server: Apache/1.3.12 (Unix) mod_perl/1.24 mod_ssl/2.6.6 OpenSSL/0.9.5a Transfer-Encoding: chunked Content-Type: text/html 209 HTML HEADTITLEFile Upload Example/TITLE/HEAD BODY h1File Upload Example/h1 FORM METHOD="POST" ENCTYPE="multipart/form-data" Enter the file to process: INPUT TYPE="file" NAME="filename" SIZE=45BR INPUT TYPE="checkbox" NAME="count" VALUE="count lines"count lines INPUT TYPE="checkbox" NAME="count" VALUE="count words"count words INPUT TYPE="checkbox" NAME="count" VALUE="count characters"count characters PINPUT TYPE="reset" INPUT TYPE="submit" NAME="submit" VALUE="Process File" /FORM 0 ^D Connection closed by foreign host. Regards Alex PS: I have put my config file and the example script at http://home.t-online.de/home/Alexander.Farber/httpd.conf http://home.t-online.de/home/Alexander.Farber/file_upload.pl (they will propagate there in few minutes)
Re: installing without root access
On Tue, 9 Jan 2001, Al Abdullaev wrote: I am a little bit confused. In the description of the process of how to install without root access it is said that I need to "The simplest approach is to simulate the portion of the / file system relevant to Perl under your home directory", What does it mean? Do I have to install perl in my directory or just use any location? Thanks a lot for the help guys and I am really sorry about my newbie questions, I just got into this. It's all explained in details at: http://perl.apache.org/guide/install.html#Installation_Without_Superuser_P _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Perl Script Source Code...
Hi Allysson, On Tue, 9 Jan 2001, Allysson Flavio wrote: Is there a way to put in our client's server only compiled scripts or like??? Or can we change Perl source code to decript our files?? I think you'd better read a book about C. Hi everybody else, Just asking, but am I the only one that gets a really bad feeling when people want to use Open Source Software to do things like this? It seems kinda counter to the spirit of it all somehow. 73, Ged.
RE: Perl Script Source Code...
perldoc -q hide
Re: Perl Script Source Code...
Hello, AFWe're developing a web based system here in Brazil for a Telecom AFEnterprise. The mod_perl was the choice of our efforts create this web AFbased system. We've already develope something in Perl and it was the AFeasiest way to work with internet. But now there is a problem. To this AFclient we don't want to put our scripts in their server. In general, the situation you are describing does not have a satisfactory solution. If you need to conceal scripts from those who are running it and administering it, you are probably doing something strange or wrong. The Perl FAQ has some references to how you can partially accomplish what you are talking about: http://www.perl.com/CPAN/doc/manual/html/pod/perlfaq3.html#How_can_I_hide_the_source_for_my Humbly, Andrew -- Andrew Ho http://www.tellme.com/ [EMAIL PROTECTED] Engineer [EMAIL PROTECTED] Voice 650-930-9062 Tellme Networks, Inc. 1-800-555-TELLFax 650-930-9101 --
Re: Perl Script Source Code...
Allysson Flavio [EMAIL PROTECTED] writes: We're developing a web based system here in Brazil for a Telecom Enterprise. The mod_perl was the choice of our efforts create this web based system. We've already develope something in Perl and it was the easiest way to work with internet. But now there is a problem. To this client we don't want to put our scripts in their server. Is there a way to put in our client's server only compiled scripts or like??? Or can we change Perl source code to decript our files?? In this case we already have an algorithm to do the job of decripting. If is it possible in what file or module we have to work on??? Generally speaking, this is very difficult to do with Perl. There are some modules that may help (notably Filter::decrypt, available at your local CPAN mirror) but there is no general solution. Modern Perls have been implementing a compiler, but basically for any real work, especially in a mod_perl environment, they are not what you seek. Maybe someday, but not yet. Probably the "best" solution would be to use some kind of encryption or decryption, like Filter::decrypt (be sure to read the man page fully first). This isn't perfect, though, as there are many, many ways to copy the code as it is being decrypted, or to reverse the encryption. So basically all you can do is make it "hard" for them to view the source, but not impossible. (There actually may be a FAQ somewhere that answers in more detail; I'm not sure offhand.) Chip -- Chip Turner [EMAIL PROTECTED] ZFx, Inc. www.zfx.com PGP key available at wwwkeys.us.pgp.net
Re: Perl Script Source Code...
"G.W. Haywood" [EMAIL PROTECTED] writes: Hi Allysson, On Tue, 9 Jan 2001, Allysson Flavio wrote: Is there a way to put in our client's server only compiled scripts or like??? Or can we change Perl source code to decript our files?? I think you'd better read a book about C. Hi everybody else, Just asking, but am I the only one that gets a really bad feeling when people want to use Open Source Software to do things like this? It seems kinda counter to the spirit of it all somehow. One could argue that Open Source giving you the choice between the two is more important than some people choosing a non-Free path. Some people choose to Open Source their work, others don't, but since Perl (and just about every module) is under the Artistic License/LGPL instead, say, of the GPL, it is implicitly allowed (and maybe arguably encouraged) to not necessarily make all of your work Free. Of course, it's much more preferable for people to release things into the Open. :) Chip -- Chip Turner [EMAIL PROTECTED] ZFx, Inc. www.zfx.com PGP key available at wwwkeys.us.pgp.net
PerlTaintMode and PERL5LIB/PERL5OPT env vars.
I've lost the original email, but this is reply from Doug to my email. I've asked to confirm that PERL5LIB is ignored with PerlTaintMode is on. Apparently the Perl docs say a different thing... Anybody has any insights about this situation? Does it has anything to do with Perl versions? Thanks! Hmm, I didn't take it out of my head, I cannot remember now when it was added. Was it different before and I've missed the patch? according to changes, it's been there 1.00_02. Anyway, that means that I should fix the guide, to remove the note about PERL5LIB and PerlTaintMode, right? these two has nothing to do with each other. right. But according to perlrun manpage (dist 5.00503): PERL5LIBA colon-separated list of directories in which to look for Perl library files before looking in the standard library and the current directory. If PERL5LIB is not defined, PERLLIB is used. When running taint checks (because the script was running setuid or setgid, or the -T switch was used), neither variable is used. The script should instead say use lib "/my/directory"; PERL5OPTCommand-line options (switches). Switches in this variable are taken as if they were on every Perl command line. Only the -[DIMUdmw] switches are allowed. When running taint checks (because the script was running setuid or setgid, or the -T switch was used), this variable is ignored. If PERL5OPT begins with -T, tainting will be enabled, and any subsequent options ignored. So both vars are ignored according to the Perl docs. How come that mod_perl doesn't? And I've tested and confirm that they aren't ignored. We obviously need to kill all inaccuracies in the book, so any insights are very welcome. Should we just say: that in contrast with perlrun man page, under mod_perl PERL5OPT and PERL5LIB enviroment variables aren't ignored. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://jazzvalley.com http://singlesheaven.com http://perlmonth.com perl.org apache.org
[OT] Re: Perl Script Source Code...
At 21:24 09/01/2001 +, G.W. Haywood wrote: Just asking, but am I the only one that gets a really bad feeling when people want to use Open Source Software to do things like this? It seems kinda counter to the spirit of it all somehow. Please let us avoid the traditional flamewar that follows code-hiding questions on perl lists. To answer your question Ged, I personally would make everything I write open source if I just had a little more time to polish it off (and that happens here and there) but I don't feel that it is within Perl culture to force OSS down people's throats. That's why we have the Artistic License which isn't polluting the way GPL is. Perl's mostly about getting the job done (and having fun doing that). If the job is to be closed source, Perl doesn't want to get in the way. I'm ok with that, so long as there is an overall OSS feel I think it's ok. Also, some people might not contribute code but still provide knowledge, advice, infrastructure, etc... -- robin b. He who laughs last thinks slowest.
Re: [OT] Perl Script Source Code...
On Tue, 9 Jan 2001, G.W. Haywood wrote: Hi Allysson, On Tue, 9 Jan 2001, Allysson Flavio wrote: Is there a way to put in our client's server only compiled scripts or like??? Or can we change Perl source code to decript our files?? I think you'd better read a book about C. Hi everybody else, Just asking, but am I the only one that gets a really bad feeling when people want to use Open Source Software to do things like this? It seems kinda counter to the spirit of it all somehow. 73, Ged. I'd hope you're the only one, either that or I missed your point. Do you get paid for coding in perl? How is that different then coding in perl then wanting to sell the software and try to maintain rights and privacy on your creation? I don't think C is a good point to bring up either, isn't gcc open-source software? It just so happens that C has built in protections for source-code theft, and perl doesn't. I don't think it makes a bit of difference what tools you use, you should be able to take whatever steps you think are necessary to protect your work. as a side note, I've never felt a need to protect my perl source like aforementioned, but I can think of a few circumstances where "protecting source" is different the "hording the source". You may just want to keep the code covered to make it a little harder for someone (with a lot more time then you) to figure out how to break it, you may want to hide a hard-coded password, or just keep things black to stop folks from wandering through because you wrote the application in 5 minutes between phone calls and meetings and you're emberrassed you put out such awful code, but it works, so run it. Jay
problems with installaation
when I run make to install mod_perl i get error saying that argument list is too long, and give me error 127 what does it all mean? should I ignore it and continue with make install??
dynamic cache allocation
Does anyone know if there is a module that enables dynamic cache allocation for apache web server on the proxy?
Re: problems with installaation
On Tue, 9 Jan 2001, Elman Vagif Abdullaev wrote: when I run make to install mod_perl i get error saying that argument list is too long, and give me error 127 what does it all mean? should I ignore it and continue with make install?? You cannot expect your question answered if you don't provide sufficient information for us to figure out what your problem is. Read the SUPPORT file to learn how to report a problem. Meanwhile a simple google search for 'Error 127' gives a bunch of hits, from which I've learned that it's possible that you run solaris and that your 'ar' apps is in unknown directory. I might be complete wrong, I've never used solaris, but I read it here: http://www.flora.org/lynx-dev/html/month062000/msg00028.html (the first hit by google.com) Hope this helps. P.S. And no, don't email me in private. Thanks! _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
difference in 123, 124 = 124_01
In upgrading to 1.24_01 I notice some warnings when the apache starts that I don't remember being present. Specifically resulting from the inclusion of perl handlers i.e. PerlRequire /usr/local/apache/libhandlers/client23.pm where the identical handler is used for both http and https service Upon seeing the PerlRequire for the same handler the second time, warnings are issued for redefinition of constants in "use vars qw(blah although perl is smart enough not to issue the warning for @INC The warning is a little peculiar, in that the 'vars' are not recognized as such. Example: /usr/local/apache/bin/httpsdctl start Constant subroutine con redefined at /usr/lib/perl5/constant.pm line 91. Constant subroutine LogSerial redefined at /usr/lib/perl5/constant.pm line 91. Constant subroutine var redefined at /usr/lib/perl5/constant.pm line 91. Subroutine pkg redefined at /usr/local/apache/libhandlers/client23.pm line 64. Subroutine AUTOLOAD redefined at /usr/local/apache/libhandlers/client23.pm line 75 The last two are real in the sense that there is a custom autoload subroutine and a 'pkg' subroutine. The warnings about the variables are mis-leading since what is redefined is a 'var', not a 'sub'. While these warnings don't hurt anything. It is my recollection that they did not occur in 123 and 124, only in _01 but my memory may be fuzzy and I don't have a machine with the older versions. The problem is that with a lot of virtual domains using both https and http service, this clutters up the start up process and buries in 'noise' any real info that might help if there is a problem. Is there a way to turn it off??? Is it necessary or even truthfully reporting what is going on given the desirability of reusing code?? Michael [EMAIL PROTECTED]
Re: dynamic cache allocation
On Tue, 9 Jan 2001, Elman Vagif Abdullaev wrote: Does anyone know if there is a module that enables dynamic cache allocation for apache web server on the proxy? "Dynamic cache allocation" could mean anything. Can you be more specific? - Perrin
Re: How do you run libapreq-0.31/eg/perl/file_upload.pl
Alexander Farber wrote: However I have this strange problem now: the web page doesn't change until I reload it. (Un)commenting "PerlSendHeader On" doesn't help. The only ways to see the expected results (like the initial empty web form, when entering http://localhost/cgi-perl/file_upload.pl into my Netscape 4.7) is to keep reloading or to go to the Edit-Preferences- Advanced-Cache and swith "Every Time" on. ... GET /cgi-perl/file_upload.pl HTTP/1.1 INPUT TYPE="submit" NAME="submit" VALUE="Process File" /FORM The currently missing /BODY /HTML might help the browser to figure out that the first page is over. Also, if nothing helps, send an explicit no-cache in the header: $r-content_type('text/html'); $r-header_out('Cache-control','no-cache'); $r-header_out('Pragma','no-cache'); $r-send_http_header; - Gerd. begin:vcard n:Kortemeyer;Gerd tel;fax:(517) 432-2175 tel;work:(517) 432-5468 x-mozilla-html:TRUE url:http://www.lite.msu.edu/kortemeyer/ org:Michigan State University;LITE Lab adr:;;123 North Kedzie Labs;East Lansing;Michigan;48824;USA version:2.1 email;internet:[EMAIL PROTECTED] title:Instructional Technology Specialist x-mozilla-cpt:;3 fn:Gerd Kortemeyer end:vcard
Can't get DBI to work with mod_perl
I'm having trouble getting a script that uses the DBI module to work under mod_perl. It works fine at the command line or as a normal cgi script. I've included the code below. When I try to run from the browser under mod_perl the only only output is the first portion of HTML. I've tried looking in the server error_log, and unfortunately no error messages are generated. I've tried putting the connect() method ahead of the initial html, in which case a get a "document contained no data" error from the browser. I'm really banging my head against the wall with this one. Any help would be much appreciated. Thanks, Joe Grastara #!/usr/local/bin/perl use strict; use DBI; use CGI qw(:standard); ###Set Local Environmental Variable for Oracle### $ENV{"ORACLE_HOME"} = "/db/"; ###Print out some HTML### print HTML_1; Content-type: text/html\n html head titlePh Lookup/title /head body bgcolor=white HTML_1 my $dbh =DBI-connect("dbi:Oracle:rcr4","grastj01","joe2",{PrintError=1});# or die "can't connect to Oracle database: $DBI::errstr\n"; my $sth = $dbh-prepare("SELECT * FROM PH.NAME where LAST_NAME LIKE 'Grastara'"); $sth-execute(); my ($row, $array_ref, @data, $i); $array_ref = $sth-fetchall_arrayref(); foreach $row (@$array_ref) { @data = @$row; } foreach $i (@data) { print "$ibr"; } print HTML_2; /body /html HTML_2
RE: Apache::SizeLimit for unshared RAM ???
On Tue, 9 Jan 2001, Rob Bloodgood wrote: I have a machine w/ 512MB of ram. unload the webserver, see that I have, say, 450MB free. So I would like to tell apache that it is allowed to use at most 425MB. I was thinking about that at some point too. The catch is, different applications have different startup costs per child. If, for example, each child ends up caching a bunch of stuff in RAM, compiling some templates, etc. you may get better performance by running a lower MaxClients and letting each child use more unshared RAM, so that they will live longer. On the other hand, some apps have very low ramp up per child, and don't cache much of anything except the RAM allocated for lexical variables. Those might scale better by running more clients and keeping them smaller. You kind of have to try it to know. The only drawback of per-process limiting is that your server could be performing better when fewer than MaxClients processes are running. It will be killing off child processes when it isn't really necessary because you're miles from MaxClients. Not that big of a deal, but unfortunate. because then all of your hard work before goes RIGHT out the window, and I'm talking about a 10-15 MB difference between JUST FINE and DEATH SPIRAL, because we've now just crossed that horrible, horrible threshold of (say it quietly now) swapping! shudder That won't happen if you use a size limit and MaxClients. The worst that can happen is processes will be killed too quickly, which will drive the load up. Yes, that would be bad, but probably not as bad as swapping. - Perrin
STDIN, STDOUT, Socket::PassAccessRights problem
I am using a CPAN module called Socket::PassAccessRights that uses the recvmsg and sendmsg system calls to pass file descriptors over a socket. More specifically, I have a long living program (not modperl) that needs to communicate with the Apache descriptors for STDIN and STDOUT given to a CGI or modperl script. The following works as an ordinary CGI but not under modperl. use IO::Socket; use Socket::PassAccessRights; $client=IO::Socket::UNIX-new(Type = SOCK_STREAM, Peer = '/tmp/socket') or die $!; Socket::PassAccessRights::sendfd(fileno($client), fileno(STDIN)) or die; Socket::PassAccessRights::sendfd(fileno($client), fileno(STDOUT)) or die; # The only info my server needs from Apache other than # the descriptors, this is POST'ed data. print $client $ENV{CONTENT_LENGTH}, "\n"; # end of script This doesn't work under modperl. I suspect that is because STDIN and STDOUT are not normal in some sense under modperl but I don't know enough to get any handle on it. You might wonder why I need modperl for such a tiny perl program. The usual reason. Even though it's so short the startup time as an ordinary cgi is quite noticeably, irritatingly longer than the corresponding C code I wrote. But C limits my flexibility as I would like to add a variety of things to the code above. Any ideas?
RE: Apache::SizeLimit for unshared RAM ???
because then all of your hard work before goes RIGHT out the window, and I'm talking about a 10-15 MB difference between JUST FINE and DEATH SPIRAL, because we've now just crossed that horrible, horrible threshold of (say it quietly now) swapping! shudder That won't happen if you use a size limit and MaxClients. The worst that can happen is processes will be killed too quickly, which will drive the load up. Yes, that would be bad, but probably not as bad as swapping. OK, so my next question about per-process size limits is this: Is it a hard limit??? As in, what if I alloc 10MB/per and every now then my one of my processes spikes to a (not unreasonable) 11MB? Will it be nuked in mid process? Or just instructed to die at the end of the current request?
RE: Apache::SizeLimit for unshared RAM ???
On Tue, 9 Jan 2001, Rob Bloodgood wrote: OK, so my next question about per-process size limits is this: Is it a hard limit??? As in, what if I alloc 10MB/per and every now then my one of my processes spikes to a (not unreasonable) 11MB? Will it be nuked in mid process? Or just instructed to die at the end of the current request? It's not a hard limit, and I actually only have it check on every other request. We do use hard limits with BSD::Resource to set maximums on CPU and RAM, in case something goes totally out of control. That's just a safety though. - Perrin
RE: Apache::SizeLimit for unshared RAM ???
On Tue, 9 Jan 2001, Rob Bloodgood wrote: OK, so my next question about per-process size limits is this: Is it a hard limit??? As in, what if I alloc 10MB/per and every now then my one of my processes spikes to a (not unreasonable) 11MB? Will it be nuked in mid process? Or just instructed to die at the end of the current request? It's not a hard limit, and I actually only have it check on every other request. We do use hard limits with BSD::Resource to set maximums on CPU and RAM, in case something goes totally out of control. That's just a safety though. chokes JUST a safety, huh? :-) Alright, then to you and the mod_perl community in general, since I never saw a worthwhile resolution to the thread "the edge of chaos," In a VERY busy mod_perl environment (and I'm taking 12.1M hits/mo right now), which has the potential to melt VERY badly if something hiccups (like, the DB gets locked into a transaction that holds up all MaxClient httpd processes, and YES it's happened more than once in the last couple of weeks), What specific modules/checks/balances would you install into your webserver to prevent such a melt from killing a box? Red Hat Linux release 6.1 (Cartman) Kernel 2.2.16-3smp on an i686 login: Out of memory for httpd Out of memory for httpd Out of memory for httpd Out of memory for httpd root Out of memory for mingetty Out of memory for httpd Out of memory for httpd sigh reset ...and before the comments about client/server/DBA/caching/proxy/loadbalance design start flying, I *know*! I'm working on it right now, but for right now I have what I have and I'm trying to keep it alive for just a little longer until the real fix is done. :-) TIA! L8r, Rob
Re: dynamic cache allocation
Well right now proxy caching have static cache allocation, i.e. it caches whatever the last request was asking for. But what I mean by dynamic caching is to have some sort of script or module that will check if the data stored on the proxy server is outdated. It will check if the data in the database that was used to generate the responce to some query was chenged and therefore data in proxy is not valid anymore. If it was changed then we again go to database and generate the responce. If the database was not changed we can just give whatever was stored in the databse to the rerquesting user. I am just wondering if something like that was done already since it would speed up internet. On Tue, 9 Jan 2001, Perrin Harkins wrote: On Tue, 9 Jan 2001, Elman Vagif Abdullaev wrote: Does anyone know if there is a module that enables dynamic cache allocation for apache web server on the proxy? "Dynamic cache allocation" could mean anything. Can you be more specific? - Perrin
Re: Apache::SizeLimit, unshared RAM idea
On Mon, Jan 08, 2001 at 11:48:36PM -0800, Joshua Chamas wrote: UNSHARED_SIZE = CURRENT_SIZE - CHILD_INIT_SIZE How would that account for pages that were shared post forked, but later copied-on-write? - Barrie
Re: difference in 123, 124 = 124_01
Hi there, On Tue, 9 Jan 2001, Michael wrote: In upgrading to 1.24_01 I notice some warnings when the apache starts that I don't remember being present. Constant subroutine con redefined at /usr/lib/perl5/constant.pm line 91. I know it says perl5 in that path, but what version of Perl are you using? The reason I ask is that I found a few similar things (the result of some sloppy coding) when I upgraded from 5.005_03 to 5.6. Been using 5.6 all along. Don't know the effect on 5.0x Michael [EMAIL PROTECTED]
RE: Apache::SizeLimit for unshared RAM ???
On Tue, 9 Jan 2001, Rob Bloodgood wrote: It's not a hard limit, and I actually only have it check on every other request. We do use hard limits with BSD::Resource to set maximums on CPU and RAM, in case something goes totally out of control. That's just a safety though. chokes JUST a safety, huh? :-) Why is that surprising? We had a dev server get into a tight loop once and use up all the CPU. We fixed that problem, but wanted to be sure that a similar problem couldn't take down a production server. since I never saw a worthwhile resolution to the thread "the edge of chaos," The problem of how to get a web server to still provide some service when it's overwhelmed by traffic is pretty universal. It's not exactly a mod_perl problem. Ultimately you can't fit 10 pounds of traffic in a 5 pound web server, so you have to improve performance or deny service to some users. In a VERY busy mod_perl environment (and I'm taking 12.1M hits/mo right now), which has the potential to melt VERY badly if something hiccups (like, the DB gets locked into a transaction that holds up all MaxClient httpd processes, and YES it's happened more than once in the last couple of weeks), What specific modules/checks/balances would you install into your webserver to prevent such a melt from killing a box? The things I already mentioned prevent the box from running out of memory. Your web service can still become unresponsive if it depends on a shared resource and that resource becomes unavailable (database down, etc.). You can put timers on your calls to those resources so that mod_perl will continue if they're hung, but it's still useless if you've got to have the database. If there's a particularly flaky resource that is only used in part of your application, you could segregate that on it's own mod_perl server so that it won't bring anything else down with it, but the usefulness of this approach depends a lot on the situation. - Perrin
How to recognize server shutdown?
Is there any way to distinguish between a child being shutdown (say maxrequests has been exceeded) versus all of Apache going down (kill signal sent to the original process or something). The reason I ask is that while I can do: BEGIN { # make a file } I can't do: END { # delete a file } and get good results. I suspect the answer to this is no but I'm curious as to whether anybody's come up with a way to detect a 'real' shutdown. -dave /*== www.urth.org We await the New Sun ==*/
cvs commit: modperl-site/embperl Changes.pod.1.html Changes.pod.10.html Changes.pod.11.html Changes.pod.12.html Changes.pod.13.html Changes.pod.14.html Changes.pod.15.html Changes.pod.16.html Changes.pod.17.html Changes.pod.18.html Changes.pod.19.html Changes.pod.2.html Changes.pod.20.html Changes.pod.21.html Changes.pod.22.html Changes.pod.23.html Changes.pod.24.html Changes.pod.25.html Changes.pod.26.html Changes.pod.27.html Changes.pod.28.html Changes.pod.29.html Changes.pod.3.html Changes.pod.30.html Changes.pod.31.html Changes.pod.32.html Changes.pod.33.html Changes.pod.34.html Changes.pod.35.html Changes.pod.36.html Changes.pod.37.html Changes.pod.38.html Changes.pod.39.html Changes.pod.4.html Changes.pod.40.html Changes.pod.41.html Changes.pod.42.html Changes.pod.43.html Changes.pod.44.html Changes.pod.45.html Changes.pod.5.html Changes.pod.6.html Changes.pod.7.html Changes.pod.8.html Changes.pod.9.html Changes.pod.cont.html
richter 01/01/07 20:24:39 Modified:embperl Changes.pod.1.html Changes.pod.10.html Changes.pod.11.html Changes.pod.12.html Changes.pod.13.html Changes.pod.14.html Changes.pod.15.html Changes.pod.16.html Changes.pod.17.html Changes.pod.18.html Changes.pod.19.html Changes.pod.2.html Changes.pod.20.html Changes.pod.21.html Changes.pod.22.html Changes.pod.23.html Changes.pod.24.html Changes.pod.25.html Changes.pod.26.html Changes.pod.27.html Changes.pod.28.html Changes.pod.29.html Changes.pod.3.html Changes.pod.30.html Changes.pod.31.html Changes.pod.32.html Changes.pod.33.html Changes.pod.34.html Changes.pod.35.html Changes.pod.36.html Changes.pod.37.html Changes.pod.38.html Changes.pod.39.html Changes.pod.4.html Changes.pod.40.html Changes.pod.41.html Changes.pod.42.html Changes.pod.43.html Changes.pod.44.html Changes.pod.45.html Changes.pod.5.html Changes.pod.6.html Changes.pod.7.html Changes.pod.8.html Changes.pod.9.html Changes.pod.cont.html Log: Embperl Webpages - Changes Revision ChangesPath 1.195 +15 -9 modperl-site/embperl/Changes.pod.1.html Index: Changes.pod.1.html === RCS file: /home/cvs/modperl-site/embperl/Changes.pod.1.html,v retrieving revision 1.194 retrieving revision 1.195 diff -u -r1.194 -r1.195 --- Changes.pod.1.html2000/12/04 08:27:03 1.194 +++ Changes.pod.1.html2001/01/08 04:24:33 1.195 @@ -1,6 +1,6 @@ HTML HEAD -TITLE1.3.0 4 Dec. 2000/TITLE +TITLE1.3.1_devv -- That's what currently under developement/TITLE LINK REV="made" HREF="mailto:[EMAIL PROTECTED]" /HEAD @@ -11,7 +11,7 @@ tr td valign=bottom align=center font size=6strong -A NAME="1_3_0_RELEASE_4_Dec_2000"1.3.0 (RELEASE) 4 Dec. 2000/a/strong/font +A NAME="1_3_1_devv_That_s_what_curren"1.3.1_devv -- That's what currently under developement/a/strong/font /tdtd rowspan=2 align=right/td /trtrtd valign=top align=center @@ -19,15 +19,21 @@ img src="line.jpg" alt="" WIDTH="732" HEIGHT="35" nbsp;nbsp;nbsp;nbsp;/td/tr/table -[a href="" HOME/a]nbsp;nbsp; [a href="Changes.pod.cont.html"CONTENT/a]nbsp;nbsp; [a href="Changes.pod.cont.html"PREV (Revision History - Content)/a]nbsp;nbsp; [a href="Changes.pod.2.html"NEXT (1.3b7 (BETA) 15. Nov 2000)/a]nbsp;nbsp; brhr +[a href="" HOME/a]nbsp;nbsp; [a href="Changes.pod.cont.html"CONTENT/a]nbsp;nbsp; [a href="Changes.pod.cont.html"PREV (Revision History - Content)/a]nbsp;nbsp; [a href="Changes.pod.2.html"NEXT (1.3.0 (RELEASE) 4 Dec. 2000)/a]nbsp;nbsp; brhr P -PRE - Corrected a wrong test, that let make test fail. Spotted by Eddie Lau. - - Added a Line Feed at the end of epnames.h, which has caused some problems - with on old SunOS compiler. Spotted by Roman Maeder. - - Fixed a problem that Perl generated an error when $req_rec and [$ var $] was - used. Spotted by Michael Stevens. +Last Update: Mon Jan 8 05:23:48 2001 (MET) + +P +NOTE: This version is only available via A HREF="CVS.pod.1.html#INTRO" "CVS"/A + + + +P +PRE - Added object and isa parameters to Execute, which allows to get an + object reference for a certain file and set the Perl inherence + hierachive. Ideas from Neil Gunton and Angus Lees. /PRE -p[a href="" HOME/a]nbsp;nbsp; [a href="Changes.pod.cont.html"CONTENT/a]nbsp;nbsp; [a href="Changes.pod.cont.html"PREV (Revision History - Content)/a]nbsp;nbsp; [a href="Changes.pod.2.html"NEXT (1.3b7 (BETA) 15. Nov 2000)/a]nbsp;nbsp; br +p[a href="" HOME/a]nbsp;nbsp; [a href="Changes.pod.cont.html"CONTENT/a]nbsp;nbsp; [a href="Changes.pod.cont.html"PREV (Revision History - Content)/a]nbsp;nbsp; [a href="Changes.pod.2.html"NEXT (1.3.0 (RELEASE) 4 Dec. 2000)/a]nbsp;nbsp; br font color="#808080"___br HTML::Embperl - Copyright (c) 1997-2000 Gerald Richter / a href="http://www.ecos.de/"ecos gmbh/a /font/p 1.34 +6 -41 modperl-site/embperl/Changes.pod.10.html Index: Changes.pod.10.html === RCS file: /home/cvs/modperl-site/embperl/Changes.pod.10.html,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- Changes.pod.10.html 2000/12/04 08:27:03