Re: mod_perl and mod_cgi problems
Thanks! I've actually made some kind of progress on this case... I've found a workaround... I don't fully like it, so if anyone got a sugestion for aprovement, please tell me! This was the "problem area" in my old httpd.conf: (...) AddHandler cgi-script .cgi AddHandler perl-script .mpl PerlHandler Apache::Registry I've converted it into this: AddHandler perl-script .cgi PerlHandler Apache::PerlRun PerlSetVar PerlRunOnce On AddHandler perl-script .mpl PerlHandler Apache::Registry This works fine, but it will only work for perl-scripts and not for shell-scripts. Well, to bad! For the perl-script part it actually runs faster! Apache don't need to fork any new processes to compile the cgi... If I add the following line to my httpd.conf: AddHandler cgi-script .sh This will most likely (not tested) fail like .cgi did when I used cgi-script-handler in apache... So the problem aren't solved yet! Stas Bekman wrote: The latest "Linker patch" are installed on the server... In that case I hope that somebody else who's on Solaris could step in and help. I do hope that someone can explain to me why mod_cgi and mod_perl don't work well together. It worked just fine using apache 1.3.14 and mod_perl 1.X (another version I can't remember). But with apache 1.3.27 and mod_perl 1.27, it didn't.
Re: mod_perl and mod_cgi problems
"@(none) <"@genuity.no wrote: Thanks! I've actually made some kind of progress on this case... I've found a workaround... I don't fully like it, so if anyone got a sugestion for aprovement, please tell me! This was the "problem area" in my old httpd.conf: (...) AddHandler cgi-script .cgi AddHandler perl-script .mpl PerlHandler Apache::Registry I've converted it into this: AddHandler perl-script .cgi PerlHandler Apache::PerlRun PerlSetVar PerlRunOnce On AddHandler perl-script .mpl PerlHandler Apache::Registry This works fine, but it will only work for perl-scripts and not for shell-scripts. Well, to bad! For the perl-script part it actually runs faster! Apache don't need to fork any new processes to compile the cgi... If I add the following line to my httpd.conf: AddHandler cgi-script .sh This will most likely (not tested) fail like .cgi did when I used cgi-script-handler in apache... So the problem aren't solved yet! Any particular reason for using AddHandler and not SetHandler? __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: mod_perl and mod_cgi problems
Magnar Stav Johanssen wrote: Sending you a piece of my httpd.conf file: [...] looks fine to me. Have you tried looking in the archives? I have found: http://marc.theaimsgroup.com/?l=apache-modperl&w=2&r=1&s=libthread+panic&q=b Well, I've used google.com alot, but maybe I didn't push the "magic" button! No need to google, pick your favorite archive from: http://perl.apache.org/maillist/modperl.html#Searchable_Archives (hint: linked from the menu) In particular: http://marc.theaimsgroup.com/?l=apache-modperl&m=91763462706496&w=2 For testing I've tuned down my MaxServers to 5 so I easier can trace httpd. In production MaxServers has been tuned for its amount of Memory! http://marc.theaimsgroup.com/?l=apache-modperl&m=97363770902299&w=2 The latest "Linker patch" are installed on the server... In that case I hope that somebody else who's on Solaris could step in and help. __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: mod_perl and mod_cgi problems
Sending you a piece of my httpd.conf file: LoadModule perl_module /local/lib/apache/libperl.so AddHandlercgi-script.cgi SetHandlerperl-script PerlHandlerApache::Status PerlSetVarStatusDumperOn PerlSetVarStatusPeekOn PerlSetVarStatusGraphOn PerlFreshRestartOn PerlSetupEnvOn PerlSendHeaderOn AddHandlerperl-script.mpl PerlHandler Apache::Registry -> I've tryed using "PerlHandler Apache::PerlRun" with same result as Apache::Registry. Adding "PerlSetVar PerlRunOnce On" -> everything works fine, but then again whats the need of using mod_perl then? mod_perl and apache are compiled using the same compiler (cc is /local/CC/SUNWspro/bin/cc) $ httpd -l Compiled-in modules: http_core.c mod_env.c mod_define.c mod_log_config.c mod_mime.c mod_status.c mod_info.c mod_include.c mod_autoindex.c mod_dir.c mod_cgi.c mod_asis.c mod_imap.c mod_actions.c mod_alias.c mod_go.c mod_access.c mod_auth.c mod_auth_anon.c mod_auth_dbm.c mod_auth_db.c mod_expires.c mod_headers.c mod_unique_id.c mod_so.c mod_setenvif.c Stas Bekman wrote: Magnar Stav Johanssen wrote: What can I do to solve this? Have you tried looking in the archives? I have found: http://marc.theaimsgroup.com/?l=apache-modperl&w=2&r=1&s=libthread+panic&q=b Well, I've used google.com alot, but maybe I didn't push the "magic" button! In particular: http://marc.theaimsgroup.com/?l=apache-modperl&m=91763462706496&w=2 For testing I've tuned down my MaxServers to 5 so I easier can trace httpd. In production MaxServers has been tuned for its amount of Memory! http://marc.theaimsgroup.com/?l=apache-modperl&m=97363770902299&w=2 The latest "Linker patch" are installed on the server... Regards!
Re: mod_perl and mod_cgi problems
Magnar Stav Johanssen wrote: Hi! On my Solaris 5.8 machine I'm running apache 1.3.27 with mod_cgi and mod_perl 1.0. mod_cgi is compiled into apache and mod_perl are loaded in my httpd.conf. When I'm requesting for any .cgi script (tested with: #!/usr/bin/perl or #!/bin/sh) everything works fine, and the scripts compile and return a 200 message to my browser. But after a request that involves mod_perl - .mpl (#!/usr/bin/perl), these cgi scripts crashes with "500: internal server error" This is the error.log: libthread panic: cannot create new lwp : dumping core (PID: 9028 LWP 2) stacktrace: ff052030 0 If I start a truss -p on the apache process (all processes) the request will be OK and reply a 200 OK message. After I've turned off all trusses, the errormessage is still there. Then I need to restart apache and all cgi scripts are working fine again. What can I do to solve this? Have you tried looking in the archives? I have found: http://marc.theaimsgroup.com/?l=apache-modperl&w=2&r=1&s=libthread+panic&q=b In particular: http://marc.theaimsgroup.com/?l=apache-modperl&m=91763462706496&w=2 http://marc.theaimsgroup.com/?l=apache-modperl&m=97363770902299&w=2 __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
mod_perl and mod_cgi problems
Hi! On my Solaris 5.8 machine I'm running apache 1.3.27 with mod_cgi and mod_perl 1.0. mod_cgi is compiled into apache and mod_perl are loaded in my httpd.conf. When I'm requesting for any .cgi script (tested with: #!/usr/bin/perl or #!/bin/sh) everything works fine, and the scripts compile and return a 200 message to my browser. But after a request that involves mod_perl - .mpl (#!/usr/bin/perl), these cgi scripts crashes with "500: internal server error" This is the error.log: libthread panic: cannot create new lwp : dumping core (PID: 9028 LWP 2) stacktrace: ff052030 0 If I start a truss -p on the apache process (all processes) the request will be OK and reply a 200 OK message. After I've turned off all trusses, the errormessage is still there. Then I need to restart apache and all cgi scripts are working fine again. What can I do to solve this? Regards, Magnar
Re: mod_perl and mod_cgi
Konstantin Yotov wrote: > MaxClients 150 > MaxRequestsPerChild 0 You're probably running out of memory and going into swap, which will give terrible performance. MaxClients 150 is really high, and you should only set MaxRequestsPerChild to 0 if you're using Apache::SizeLimit or Apache::GTopLimit. There's a lot of information about these settings in the guide at http://perl.apache.org/guide/. - Perrin
mod_perl and mod_cgi
Hello! Here some details of my httpd.conf PerlTaintcheck On Alias /perl/ /home/httpd/perl/ PerlModule Apache::Registry SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI allow from all PerlSendHeader On PerlModule newdate::index SetHandler perl-script PerlHandler newdate::index my error_log Apache/1.3.24 (Unix) mod_perl/1.26 configured -- resuming normal operations MaxClients 150 MaxRequestsPerChild 0 OS Linux Slackware kernel 2.2.19 CPU - 700MHz Pentium III RAM 512MB I be very grateful if some can get advice how tow find out why my new scripts run twice slow than old cgi version. Thank you Kosyo __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com
Re: mod_perl and mod_cgi
At 17:38 15.05.2002, Konstantin Yotov wrote: >Hello! :) >I'm webmaster for a small site about /3000 hits and >4 host daily/. I rewrote my cgi scripts for >mod_perl/made all global variables local and etc/ >following the instructions of mod_perl guide. On my >development machine everything was ok, but when I move >to productional server the mod_perl version works >twice slower than mod_cgi. >Please tell me where could be the problem/Apache >configuration or my new scripts/ or a way to locate >it. >Thank you. Well, it might be because you have more requests on your production server than on your dev box... Other than that, we can't do much without a little more information. Maybe you want to read the performance sections in the guide.. -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: mod_perl and mod_cgi
Konstantin Yotov wrote: > On my > development machine everything was ok, but when I move > to productional server the mod_perl version works > twice slower than mod_cgi. Start by making sure you really have mod_perl installed and your scripts are running under it, and not mod_cgi. You can verify this using the instructions in the guide. One quick way is to check the value of $ENV{'MOD_PERL'}. Also, which platform are you on and what are your settings for MaxClients and MaxRequestsPerChild form httpd.conf? - Perrin
mod_perl and mod_cgi
Hello! :) I'm webmaster for a small site about /3000 hits and 4 host daily/. I rewrote my cgi scripts for mod_perl/made all global variables local and etc/ following the instructions of mod_perl guide. On my development machine everything was ok, but when I move to productional server the mod_perl version works twice slower than mod_cgi. Please tell me where could be the problem/Apache configuration or my new scripts/ or a way to locate it. Thank you. __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com