Stas Bekman | 1 Oct 2004 03:38

Re: mod_perl crashing / hanging

Torsten Förtsch wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Thursday 30 September 2004 19:48, Alex Greg wrote:
> 
>>Thanks for your response. Sorry I wasn't clear; the httpd processes
>>don't actually kill the server, they just slow Apache right down to the
>>point at which it doesn't respond to requests any more. I am still able
>>to get onto the box and kill the processes etc. without having to do a
>>hard reboot or anything. My question is what's causing Apache to get
>>into the state where it can't fork any more shells from Perl.
> 
> 
> Activate mod_status and look at it's output. I suspect you'll see a lot of 
> W's, L's or C's. This can give you a hint what your server processes are 
> doing.

Or even better -- use Apache::VMonitor :)

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas <at> stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

--

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
(Continue reading)

Stas Bekman | 1 Oct 2004 03:58

Re: Bug report

leo <at> secline.com.br wrote:
> -------------8<---------- Start Bug Report ------------8<----------
> 1. Problem Description:
> 
> test server didn't start (t/logs/error_log):

Leo, have you by chance read the suggestion that was printed out when 
'make test' has aborted. Please try again and do exactly what it suggested.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas <at> stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

--

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Stas Bekman | 1 Oct 2004 04:08

Re: [mp2] NetBSD-2.0_RC1 httpd-2.0.52 modperl-1.99_17-dev configure error

MGorbunov <at> imbank.ru wrote:
> NetBSD-2.0_RC1 + perl-5.8.5 + httpd-2.0.52 :
> 
> all the above builds and runs OK, but
> 
> when trying to configure source of modperl-1.99_17-dev I get the 
> following:
> 
> $ perl Makefile.PL MP_AP_PREFIX=$HOME/mp-test/httpd-2.0
> Reading Makefile.PL args from  <at> ARGV
>    MP_AP_PREFIX = /home/mgorb/mp-test/httpd-2.0
> [  error] invalid MP_AP_PREFIX: include/ directory not found in 
> /home/mgorb/mp-test/httpd-2.0
> 
> $ ls /home/mgorb/mp-test/httpd-2.0
> bin     cgi-bin error   icons   lib     man     modules
> build   conf    htdocs  include logs    manual

I can't reproduce that. Could you please try to debug that code? It's just 
perl in Makefile.PL.

Also I suspect that it might something to do with the fact that you have 
httpd-2.0 as a sub-dir of modperl-2.0? But I can't tell where the 
modperl-2.0 source lives from your report. So it's just an idea.

--

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas <at> stason.org http://use.perl.org http://apacheweek.com
(Continue reading)

Tom Schindl | 1 Oct 2004 10:05
Picon
Picon

Re: mod_perl crashing / hanging

Alex Greg wrote:
> Geoffrey Young wrote:
> 
>>
[...]

> 
> Thanks for your response. Sorry I wasn't clear; the httpd processes 
> don't actually kill the server, they just slow Apache right down to the 
> point at which it doesn't respond to requests any more. I am still able 
> to get onto the box and kill the processes etc. without having to do a 
> hard reboot or anything. My question is what's causing Apache to get 
> into the state where it can't fork any more shells from Perl.
> 
>>> This is because a shell call to date ($date = `date`;) is failing - this
>>> is most likely what's causing the failure to fork we see above.
>>
>>
>>
>> if you want to avoid that shell call try POSIX::strftime() instead.
> 
> 
> 
> We have quite a lot of calls via backticks throughout our code - and not 
> just for things like date that are trivially replaceable. Would you 
> recommend replacing these as far as possible?

Yes because calling the shell is fairly slow if there are any 
perl-modules you could use these instead and it will certainly give you 
a performance boost.
(Continue reading)

MGorbunov | 1 Oct 2004 13:28
Picon

Re: [mp2] NetBSD-2.0_RC1 httpd-2.0.52 modperl-1.99_17-dev configure error

Stas Bekman <stas <at> stason.org> wrote on 01.10.2004 06:08:34: 
> I can't reproduce that. Could you please try to debug that code? It's 
just 
> perl in Makefile.PL.

tried that with perl -d Makefile.PL MP_AP_PREFIX=$HOME/mp-test/httpd-2.0

looks like it stops here:

171:        unless ($val) {
  DB<129> s
Apache::Build::apxs(lib/Apache/Build.pm:173):
173:            my $error = qx($apxs  <at> _ 2>&1);
  DB<131> s
Can't exec "/home/mgorb/mp-test/httpd-2.0/bin/apxs": No such file or 
directory at lib/Apache/Build.pm line 173.
 at lib/Apache/Build.pm line 173
        Apache::Build::apxs('Apache::Build=HASH(0x8d7fcb8)', '-q', 
'INCLUDEDIR') called at lib/Apache/Build.pm line 82
        Apache::Build::ap_prefix_invalid('Apache::Build=HASH(0x8d7fcb8)') 
called at Makefile.PL line 206
        main::configure() called at Makefile.PL line 52

...

looking into /home/mgorb/mp-test/httpd-2.0/bin/apxs ( which appeared to be 
a perl script :) ) showed "#!/replace/with/path/to/perl/interpreter -w" at 
the first line. Replaced it with "/usr/local/bin/perl". After that "perl 
Makefile.PL" worked and mp2 was built OK, but some tests failed:

(Continue reading)

Stas Bekman | 1 Oct 2004 16:20

Re: [mp2] NetBSD-2.0_RC1 httpd-2.0.52 modperl-1.99_17-dev configure error

MGorbunov <at> imbank.ru wrote:
> Stas Bekman <stas <at> stason.org> wrote on 01.10.2004 06:08:34: 
> 
>>I can't reproduce that. Could you please try to debug that code? It's 
> 
> just 
> 
>>perl in Makefile.PL.
> 
> 
> tried that with perl -d Makefile.PL MP_AP_PREFIX=$HOME/mp-test/httpd-2.0
> 
> looks like it stops here:
> 
> 171:        unless ($val) {
>   DB<129> s
> Apache::Build::apxs(lib/Apache/Build.pm:173):
> 173:            my $error = qx($apxs  <at> _ 2>&1);
>   DB<131> s
> Can't exec "/home/mgorb/mp-test/httpd-2.0/bin/apxs": No such file or 
> directory at lib/Apache/Build.pm line 173.
>  at lib/Apache/Build.pm line 173
>         Apache::Build::apxs('Apache::Build=HASH(0x8d7fcb8)', '-q', 
> 'INCLUDEDIR') called at lib/Apache/Build.pm line 82
>         Apache::Build::ap_prefix_invalid('Apache::Build=HASH(0x8d7fcb8)') 
> called at Makefile.PL line 206
>         main::configure() called at Makefile.PL line 52

Why doesn't it print out the error then?

(Continue reading)

Fco. Valladolid | 1 Oct 2004 17:27

Re: [mp2] NetBSD-2.0_RC1 httpd-2.0.52 modperl-1.99_17-dev configure error

Hi, You has try via pkgsrc ?, maybe be a solution.

Reagrds.

On Fri, Oct 01, 2004 at 10:20:50AM -0400, Stas Bekman wrote:
> MGorbunov <at> imbank.ru wrote:
> >Stas Bekman <stas <at> stason.org> wrote on 01.10.2004 06:08:34: 
> >
> >>I can't reproduce that. Could you please try to debug that code? It's 
> >
> >just 
> >
> >>perl in Makefile.PL.
> >
> >
> >tried that with perl -d Makefile.PL MP_AP_PREFIX=$HOME/mp-test/httpd-2.0
> >
> >looks like it stops here:
> >
> >171:        unless ($val) {
> >  DB<129> s
> >Apache::Build::apxs(lib/Apache/Build.pm:173):
> >173:            my $error = qx($apxs  <at> _ 2>&1);
> >  DB<131> s
> >Can't exec "/home/mgorb/mp-test/httpd-2.0/bin/apxs": No such file or 
> >directory at lib/Apache/Build.pm line 173.
> > at lib/Apache/Build.pm line 173
> >        Apache::Build::apxs('Apache::Build=HASH(0x8d7fcb8)', '-q', 
> >'INCLUDEDIR') called at lib/Apache/Build.pm line 82
> >        Apache::Build::ap_prefix_invalid('Apache::Build=HASH(0x8d7fcb8)') 
(Continue reading)

Sean Scanlon | 1 Oct 2004 19:18
Picon

PerlCleanupHandler and redirect

I am having a problem with using a cleanup handler where it seems that
the CleanupHandler is blocking the client browser from a redirect

From what i understand the cleanup handler happens after the
connection is closed.

I am using the cleanup handler to do some lengthy processing while the
user is redirected to a wait page.

i am registering the handler like so:
$r->register_cleanup('MyPackage::LongProcess');

if i have the handler return right away instead of doing any processing,
the client is redirected right away otherwise it blocks until the
handler returns
which happens after the client times out.

has anyone else experienced this kind of behavior?

any info or pointers is greatly appreciated!
Thanks,
-- 
-------------------------
Sean P. Scanlon
perl -le 'print pack("h*", "375616e6e2373616e6c6f6e6e236f6d6")'
-------------------------

--

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
(Continue reading)

Peter Leonard | 1 Oct 2004 21:56
Gravatar

ANNOUNCE: Krang 1.025


Krang v1.025 is now available.  Notable changes in this release:

  - Fixes an incomplete upgrade process in 1.024.  Users who upgraded
    their Krang installations to 1.024 should immediately upgrade to
    1.025.

  - Improved error handling and reporting in the command-line
    krang_publish script.

  Detailed change-log here: http://krang.sf.net/docs/changelog.html

  Krang is an Open Source web-publisher / content-management system
  designed for large-scale magazine-style websites.  It is a 100% Perl
  application using Apache/mod_perl and MySQL, as well as numerous CPAN
  modules.

  Krang provides a powerful and easy to use story and media editing
  environment for magazine editors, as well as a complete template
  development environment for web designers. On the back-end, Perl
  programmers can customize Krang to control the data entered in the
  story editor and add code to drive the templates to build output.
  Krang can be enhanced with add-ons containing new skins and other new
  features.  Krang easily handles large data sets and can manage
  multiple websites in a single installation.

  For more information about Krang, visit the Krang website:

    http://krang.sourceforge.net/

(Continue reading)

Colin Murtaugh | 1 Oct 2004 22:15
Picon
Favicon

Re: SOAP::Lite, libapreq not playing together?

Perhaps I'm missing something in what you're trying to do, but you might
try Apache::SOAP.  Apache::SOAP makes it super-easy to call perl
subroutines running under mod_perl.

I have something like this in my apache config, which maps requests to a
Perl module:

    <Location "/soaptest">
        SetHandler perl-script
        PerlHandler Apache::SOAP
        PerlSetVar dispatch_to "Some::Module"
    </Location>

and then, my module:

	package Some::Module;

	sub add {
		my ($val1, $val2) =  <at> _;
		my $result = $val1 + $val2;
		return $result;		
	}
	
	sub subtract {
		my ($val1, $val2) =  <at> _;
		my $result = $val1 - $val2;
		return $result;		
	}
	1;

(Continue reading)


Gmane