I'm sure there are no other servers.  I'm actually stopping my live server 
to try this.  I stop it, change the config file and start it - and it 
doesn't come up and no server is running.  So, I put it back and start it 
and its OK again.

I tried "set args -X" in gdb, and the result was that the server worked fine.
So, I guess the problem is related to starting the child servers.

Prakash Kailasa's reply talks about what is probably the same thing that is 
happening to me.

He said:
>I started apache with strace and the output shoed me that apache is
>blowing up when mod_perl is trying to load the first shared object
>(.so file), which in my case happened to be IO.so. This only happens
>in the first forked child process. The root apache process loads
>everything just fine. But I think when the root process gets a
>signal that the child has died, it is also dying silently.

I believe that this is the same thing that is happening to me.

Cliff - are you using PerlRequire successfully?  What version of Apache and 
mod_perl are you using?

Prakash Kailasa also said:
>I have accidentally found a workaround. It may or may not work for
>you.
>
>- Comment the PerlRequire line.
>- Run: "apachectl stop" and then "apachectl start"
>- Uncomment the PerlRequire line.
>- Run: "apachectl graceful"

I don't have an "apachectl" installed, I use /etc/rc.d/init.d/httpd, and it 
doesn't have "graceful" as an option (only 
stop|start|restart|status|reload).  Maybe "graceful" is the same as 
"reload"?  I'll try that...

When I use reload in this way it seems to do what I wanted.  My httpd 
processes seem to be using more memory to start (from the Perl "use" lines 
pre-loading stuff) - but as I understand it, that's probably shared memory 
(the whole point of using PerlRequire).

So, are some people successfully using PerlRequire out there?  What 
versions of Apache and mod_perl are you using?  What OS?

...something is wrong for a couple of us out here.

-bill

At 02:00 PM 12/13/99 , Cliff Rayman wrote:
>are you sure that there are no other webservers
>currently running and on port 80?
>
>do the 'set args' gdb command with at least the -X parameter
>before executing run.
>
>when you start apache and it blows up, is apache using any
>other command line arguments such as -DSSL?
>if so, make sure you use that on the set args line as well
>so you are running the program with the same enviroment
>in gdb as when you run with apachectl.
>
>cliff rayman
>genwax.com
>
>Bill Marrs wrote:
>
> > At 10:14 AM 12/11/99 -0800, Cliff Rayman wrote:
> >
> > >Stas Bekman wrote:
> > >
> > > > On Sat, 11 Dec 1999, Bill Marrs wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I've been using mod_perl successfully albeit minimally for a couple
> > > months
> > > > > now.
> > > > > I'm trying to tune performance and memory usage by consolidating some
> > > > > common Perl "use" directives in a PerlRequire 
> statement.  However, when I
> > > > > add this line to my Apache config file 
> (/etc/httpd/conf/httpd.conf), the
> > > > > server fails to come up - and also give no indication that I can find
> > > of a
> > > > > problem.  So, I don't know what's going wrong.
> > > > >
> > > > > Here's what I'm adding to my httpd.conf file:
> > > > >
> > > > > PerlRequire /home/ugtz/startup.pl
> > > > >
> > > > >
> > > > > I have the usual stuff in my /home/ugtz/startup.pl file, actually 
> I tried
> > > > > commenting everything but the #!/usr/local/bin/perl and the "1;" 
> at the
> > > > > end, and it still failed.  So, I don't think the contents of the 
> file are
> > > > > at fault.
> > > > >
> > > > > My httpd error log doesn't say anything is wrong, it actually 
> doesn't log
> > > > > anything - like it never got that far...
> > >
> > >make sure no server is running on port 80 or use an alternate config with
> > >an alternate port if you are on a production server.
> > >cd /usr/local/apache/bin  # where ever your binary is
> > >gdb httpd
> > >set args -X -f /path/to/alternate/serverconfig_ifneeded.conf
> > >run
> > >
> > >it should blow up!
> > >then,
> > >bt
> > >
> > >this will show you a backtrace of what was happening when it blew up.
> > >post that to the list and we may be able to come up with some better
> > >guesses as to the problem.  make sure to include versions of apache,
> > >mod perl and perl.
> >
> > I tried this, but the server is just happily and quietly exiting - no blow
> > up, no indication of why it's failing (unless I don't know where to look).
> >
> > [root@ugtz /root]# cd /usr/sbin/
> > [root@ugtz sbin]# gdb httpd
> > GNU gdb 4.17.0.11 with Linux support
> > Copyright 1998 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and 
> you are
> > welcome to change it and/or distribute copies of it under certain 
> conditions.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty" for details.
> > This GDB was configured as "i386-redhat-linux"...
> > (no debugging symbols found)...
> > (gdb) run
> > Starting program: /usr/sbin/httpd
> >
> > Program exited normally.
> > (gdb) quit
> >
> > # httpd -V
> > Server version: Apache/1.3.9 (Unix)  (Red Hat/Linux)
> > Server built:   Sep 21 1999 10:46:27
> > Server's Module Magic Number: 19990320:6
> > Server compiled with....
> >   -D HAVE_MMAP
> >   -D HAVE_SHMGET
> >   -D USE_SHMGET_SCOREBOARD
> >   -D USE_MMAP_FILES
> >   -D USE_FCNTL_SERIALIZED_ACCEPT
> >   -D HTTPD_ROOT="/usr"
> >   -D SUEXEC_BIN="/usr/sbin/suexec"
> >   -D DEFAULT_PIDLOG="/var/run/httpd.pid"
> >   -D DEFAULT_SCOREBOARD="/var/run/httpd.scoreboard"
> >   -D DEFAULT_LOCKFILE="/var/run/httpd.lock"
> >   -D DEFAULT_XFERLOG="/var/log/httpd/access_log"
> >   -D DEFAULT_ERRORLOG="/var/log/httpd/error_log"
> >   -D TYPES_CONFIG_FILE="/etc/httpd/conf/mime.types"
> >   -D SERVER_CONFIG_FILE="/etc/httpd/conf/httpd.conf"
> >   -D ACCESS_CONFIG_FILE="/etc/httpd/conf/access.conf"
> >   -D RESOURCE_CONFIG_FILE="/etc/httpd/conf/srm.conf"
> >
> > I believe the mod_perl version I'm running is:
> >
> > mod_perl/1.21
> >
> > (I'm not sure how to officially get this info)
> >
> > # httpd -l
> > Compiled-in modules:
> >    http_core.c
> >    mod_so.c

Reply via email to