You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Kraaij, Wessel" <Kr...@TPD.TNO.NL> on 2000/12/06 11:28:22 UTC

RE: crash on connect (DBI/mysql) (2)

Bas,
thanks for your comments. They are a first step to solve the problem.

> [DBI script problem skipped]
> 
> > The error_log from Apache shows some problems, which 
> *could* be related to
> > mod_perl
> > 
> > [Tue Dec  5 09:42:31 2000] [crit] (13)Permission denied: 
> make_sock: could
> > not bi
> > nd to port 80
> 
> Uhm, before we try to solve the problem in hand, I don't 
> understand your
> statement of Apache showing *some* problems. What port are you running
> mod_perl server at? 80? do you run a single mod_perl server 
> or is there a
> front-end server?
I run apache/mod_perl as a single httpd server at port 80.
It might be a uid/gid problem. I replaced httpd/httpd (which were just
copied from a different Apache installation) by nobody/nobody.

The server restarts clean now:

[Tue Dec  5 16:05:12 2000] [notice] FastCGI: process manager initialized
(pid 28
76)
[Tue Dec  5 16:05:12 2000] [notice] Apache/1.3.12 (Unix) mod_fastcgi/2.2.8
PHP/4
.0.2 mod_perl/1.24 configured -- resuming normal operations
As you notice, Apache also runs a fastgci module, which I eventually want to
replace by mod_perl applications.
> 
> Second, you should make your code more debug friendly. Replace:
> $dbh = DBI->connect('dbi:mysql:vip;host=####', '###', '###');
> with
> $dbh = DBI->connect('dbi:mysql:vip;host=####', '###', '###') 
> 	or die $DBI::errstr;
> 
> what error do you get?
I modified my code, the error_log shows a seg fault for each call to the
mod_perl script:

[Tue Dec  5 16:05:38 2000] [notice] child pid 2878 exit signal Segmentation
Faul
t (11)
[Tue Dec  5 16:05:40 2000] [notice] child pid 2877 exit signal Segmentation
Faul
t (11)
[Tue Dec  5 16:05:41 2000] [notice] child pid 2879 exit signal Segmentation
Faul
t (11)
[Tue Dec  5 16:05:42 2000] [notice] child pid 2880 exit signal Segmentation
Faul
t (11)
[Tue Dec  5 16:06:42 2000] [notice] child pid 2884 exit signal Segmentation
Faul
t (11)


At least the error_log shows now that mod_perl crashes before being able to
echo the
diagnostic DBI::errstr .


Wessel Kraaij, TNO-TPD

RE: crash on connect (DBI/mysql) (2)

Posted by Stas Bekman <st...@stason.org>.
> The server restarts clean now:

good

> > Second, you should make your code more debug friendly. Replace:
> > $dbh = DBI->connect('dbi:mysql:vip;host=####', '###', '###');
> > with
> > $dbh = DBI->connect('dbi:mysql:vip;host=####', '###', '###') 
> > 	or die $DBI::errstr;
> > 
> > what error do you get?
> I modified my code, the error_log shows a seg fault for each call to the
> mod_perl script:
> 
> [Tue Dec  5 16:05:38 2000] [notice] child pid 2878 exit signal Segmentation
> Faul
> t (11)
> [Tue Dec  5 16:05:40 2000] [notice] child pid 2877 exit signal Segmentation
> Faul
> t (11)
> [Tue Dec  5 16:05:41 2000] [notice] child pid 2879 exit signal Segmentation
> Faul
> t (11)
> [Tue Dec  5 16:05:42 2000] [notice] child pid 2880 exit signal Segmentation
> Faul
> t (11)
> [Tue Dec  5 16:06:42 2000] [notice] child pid 2884 exit signal Segmentation
> Faul
> t (11)
> 
> 
> At least the error_log shows now that mod_perl crashes before being able to
> echo the
> diagnostic DBI::errstr .

Good, so now you read the SUPPORT file and follow the instructions on how
to provide the segfault trace.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:stas@stason.org   http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/