Strange Apache error (appears to be related to bad pidfile)

--00504502e5013ac702046b4731a7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Good morning,

I've had a strange problem with Apache twice in the past week, and I'm out
of ideas as to what might be going on.

Here's the background: I run a website that uses a plain-vanilla Apache
server to serve images, and uses mod_proxy to forward requests for
everything else to a backend mod_perl server on a different port on the same
ip address. (I think this scenario used to be documented here:
http://perl.apache.org/docs/1.0/guide/install.html#Installat ion_Scenarios_for_mod_perl_and_Other_Components,
but it doesn't appear to be there anymore.)

The problem that I ran into is that after running on the same configuration
for years, and without a reboot for a month or so, the plain-vanilla Apache
server stopped serving requests.

- My first try was to execute apachectl stop and then apachectl start.
apachectl printed: "/usr/local/apache-light/bin/apachectl start: httpd
started". However, it wasn't running (which I verified by trying to run
apachectl status and then apachectl stop).
- The first time this happened, I was running Apache 1.3.37. I
downloaded the tarball for Apache 1.3.41 and installed that in place of
1.3.37. The second time this error occurred it occurred with 1.3.41.
- No messages were written to the access_log or error_log
- /usr/local/apache-light/bin/apachectl configtest returned "Syntax OK"
- apachectl points to the correct pidfile (at least it's the one
specified in /usr/local/apache-light/conf/httpd.con), and it looks to me
like root has perfectly reasonable rights to the pidfile.

I was eventually able to restart the apache process the first time by
deleting the pidfile. When I ran apachectl start without a pidfile, the
apache process started up and ran without problems for 3 days. The second
time this happened, it wasn't enough to delete the pid file. I again
reinstalled apache, and went so far as to reboot the server. (fsck did not
find any errors on reboot.) This time, I was only able to restart the sever
after running the following:

[root [at] data2]# touch /usr/local/apache-light/logs/httpd.pid
[root [at] data2]# rm -f /usr/local/apache-light/logs/httpd.pid
[root [at] data2]# /usr/local/apache-light/bin/apachectl start

This finally worked, and the server has been serving requests for 3 days
now.

Any ideas on what might be going on? I'd love to have some ideas before
this happens again -- it's been a stressful 45 minutes each time while I
scrambled to try to figure out how to restart it.

Thanks!
-Chris

--00504502e5013ac702046b4731a7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Good morning,<br><br>I've had a strange problem with Apache twice in th=
e past week, and I'm out of ideas as to what might be going on.=A0 <br>


<br>Here's the background: I run a website that uses a plain-vanilla Ap=
ache server to serve images, and uses mod_proxy to forward requests for eve=
rything else to a backend mod_perl server on a different port on the same i=
p address.=A0 (I think this scenario used to be documented here: <a href=3D=
"http://perl.apache.org/docs/1.0/guide/install.html#Installa tion_Scenarios_=
for_mod_perl_and_Other_Components" target=3D"_blank">http://perl.apache.org=
/docs/1.0/guide/install.html#Installation_Scenarios_for_mod_ perl_and_Other_=
Components</a>, but it doesn't appear to be there anymore.)<br>



<br>The problem that I ran into is that after running on the same configura=
tion for years, and without a reboot for a month or so, the plain-vanilla A=
pache server=A0 stopped serving requests.=A0 <br><ul><li>My first try was t=
o execute apachectl stop and then apachectl start.=A0 apachectl printed: &q=
uot;/usr/local/apache-light/bin/apachectl start: httpd started".=A0 Ho=
wever, it wasn't running (which I verified by trying to run apachectl s=
tatus and then apachectl stop).</li>


<li>=A0The first time this happened, I was running Apache 1.3.37.=A0 I down=
loaded the tarball for Apache 1.3.41 and installed that in place of 1.3.37.=
=A0 The second time this error occurred it occurred with 1.3.41.</li><li>No=
messages were written to the access_log or error_log=A0</li>


<li>/usr/local/apache-light/bin/apachectl configtest returned "Syntax =
OK"</li><li>apachectl points to the correct pidfile (at least it's=
the one specified in /usr/local/apache-light/conf/httpd.con), and it looks=
to me like root has perfectly reasonable rights to the pidfile.</li>


</ul>
I was eventually able to restart the apache process the first time by delet=
ing the pidfile.=A0 When I ran apachectl start without a pidfile, the apach=
e process started up and ran without problems for 3 days.=A0 The second tim=
e this happened, it wasn't enough to delete the pid file.=A0 I again re=
installed apache, and went so far as to reboot the server.=A0 (fsck did not=
find any errors on reboot.)=A0 This time, I was only able to restart the s=
ever after running the following:<br>

<br>[root [at] data2]# touch /usr/local/apache-light/logs/httpd.pid<br>[root [at] dat=
a2]# rm -f /usr/local/apache-light/logs/httpd.pid<br><div>[root [at] data2]# /us=
r/local/apache-light/bin/apachectl start<br>

<br>This finally worked, and the server has been serving requests for 3 day=
s now.<br><br>Any ideas on what might be going on?=A0 I'd love to have =
some ideas before this happens again -- it's been a stressful 45 minute=
s each time while I scrambled to try to figure out how to restart it.<br>

<br>Thanks!<br>-Chris<br><br><br></div><br>
<br><br>
<br><br>

--00504502e5013ac702046b4731a7--
Chris Brooks [ Mo, 01 Juni 2009 12:50 ] [ ID #2003535 ]

Re: Strange Apache error (appears to be related to bad pidfile)

On Mon, Jun 1, 2009 at 6:50 AM, Chris Brooks <madbury [at] gmail.com> wrote:
> My first try was to execute apachectl stop and then apachectl start.

You won't see the errors if you use apachectl. Just talk to httpd
directly instead.

- Perrin
Perrin Harkins [ Mo, 01 Juni 2009 17:25 ] [ ID #2003538 ]

Re: Strange Apache error (appears to be related to bad pidfile)

--001636c5a82f2bb941046b4cbbde
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi Perrin,

Cool, that's a good suggestion. I'll work with httpd directly if it happens
again.

Thanks,
Chris

On Mon, Jun 1, 2009 at 10:25 AM, Perrin Harkins <pharkins [at] gmail.com> wrote:

> On Mon, Jun 1, 2009 at 6:50 AM, Chris Brooks <madbury [at] gmail.com> wrote:
> > My first try was to execute apachectl stop and then apachectl start.
>
> You won't see the errors if you use apachectl. Just talk to httpd
> directly instead.
>
> - Perrin
>

--001636c5a82f2bb941046b4cbbde
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi Perrin,<br><br>Cool, that's a good suggestion.=A0 I'll work with=
httpd directly if it happens again.<br><br>Thanks,<br>Chris<br><br><div cl=
ass=3D"gmail_quote">On Mon, Jun 1, 2009 at 10:25 AM, Perrin Harkins <span d=
ir=3D"ltr"><<a href=3D"mailto:pharkins [at] gmail.com">pharkins [at] gmail.com</a>=
></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class=3D"im"=
>On Mon, Jun 1, 2009 at 6:50 AM, Chris Brooks <<a href=3D"mailto:madbury=
[at] gmail.com">madbury [at] gmail.com</a>> wrote:<br>

> My first try was to execute apachectl stop and then apachectl start.<b=
r>
<br>
</div>You won't see the errors if you use apachectl. =A0Just talk to ht=
tpd<br>
directly instead.<br>
<font color=3D"#888888"><br>
- Perrin<br>
</font></blockquote></div><br>

--001636c5a82f2bb941046b4cbbde--
Chris Brooks [ Mo, 01 Juni 2009 19:26 ] [ ID #2003541 ]
Webserver » gmane.comp.apache.mod-perl » Strange Apache error (appears to be related to bad pidfile)

Vorheriges Thema: Problems with SetEnv and Alias
Nächstes Thema: Using mod_perl on Vista - get Error - Can't load Perl module ModPerl::Registry