Re: [users@httpd] Apache 2 chaos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok, if Apache is truly hanging, there is a clever trick (that works on all
versions of Apache).

1) Unzip the -symbols.zip files in the root Apache2 directory tree (where
   bin\, htdocs\, modules\ etc. are usually found.)  These .pdb files should
   unpack alongside the .exe, .dll, .so binary files they represent, e.g.,
   mod_usertrack.pdb will unpack alongside mod_usertrack.so.

2) Invoke drwtsn32 and ensure you are creating a crash dump file, you are
   dumping all thread contexts, your log and crash dump paths make sense, and
   (depending on the nature of the bug) you pick an appropriate crash dump
   type.  (Full is quite large, but necessary sometimes for a programmer-type
   to load your crash dump into a debugger and begin unwinding exactly what
   has happened.  Mini is sufficient for your first pass through the process.)

3) Note that if you previously installed and then uninstalled other debugging
   software, you may need to invoke   drwtsn32 -i   in order to make Dr Watson
   your default crash dump tool.  This will replace the 'report problem to MS'
   dialogs.  Don't do this if you have a full debugger such as Visual Studio
   or windbg installed on the machine.

3) Invoke the Task Manager, Choose 'show processes from all users', and modify
   the View -> Select Columns to include *at least* the PID and Thread Count.
   You can change this just once and Task Manager should keep your preference.

4) Now, track down the errant Apache that is hanging.  The parent process has
   about three threads, we don't care about that one.  The child worker process
   we want has many more threads (a few more than you configured with the
   ThreadsPerChild directive.)  The process name is Apache (for 1.3 and 2.0)
   or httpd (for 2.2).  Make note of the child worker's PID.

5) Using the {pid} number you noted above, invoke the command

   drwtsn32 -p {pid}

Voila, you will find in your 'log file path' a drwtsn32.log file, and if you
choose to 'append to existing log file', jump through the 'App:' sections until
you find the one for the process you just killed.  Now you can provide feedback
about where 'Stack Back Trace' points to for the developer-oriented users here.

Whatever you don't don't send the whole thing to this list!!!  You will note
that many threads look identical, almost all of them polling for the next
connection, and we don't care to see those.  We want to see the ones that are
deep inside of a request at the time you kill them, and only the stack back
trace entries for those.  This can give folks a clue of where that request is
hanging, which handler module picked up the request, and what filter it might
be stuck in.

Best of luck!

Oliver Marshall wrote:
Yep. Thought I got it working again, but after serving up a page or to,
the server is now not responding. Port 80 is open, a connection is made,
but no response is received from the server. Browsers site there waiting
for an eternity.


GRRRR!!! If the designer wasn't so far away I would go and kick their
a**e.

Olly



-----Original Message-----
From: Rob Wilkerson [mailto:r.d.wilkerson@xxxxxxxxx] Sent: 18 July 2006 16:13
To: users@xxxxxxxxxxxxxxxx
Subject: Re: [users@httpd] Apache 2 chaos

At the risk of being too obvious, is the NameVirtualHosts directive
uncommented?  By default virtualhosts are not enabled - even if you
have added virtual host blocks...

On 7/18/06, Oliver Marshall <Oliver.Marshall@xxxxxxxxxxxxx> wrote:
What a day ! A clients web designer decided to make some changes to
the
conf file on our windows 2003 based apache box. Nothing terrible
there,
but when it didn't do what was wanted, and apache failed to load, they
decided to start pulling files from the apache folder. When that
didn't
work, they decided to reinstall apache. Finally, after a few hours
poking, they decided to send a tacit email to me explaining that the
server isn't working.

Now, having uninstalled apache, removed all the apache folders and
their
files, removed all the reg entries from the registry, I have installed
v2.

That's where things started getting really odd. Apache seemed to serve
up pages from the default site, ie the one in httpd.conf which is
listed
at the start of the httpd.conf file, before the virtualhost entries.
It
seemed to totally ignore any virtualhost entries in the httpd. Any
changes there were never actioned by apache, despite the APACHE -S
saying the syntax was correct.

So, I tried 2.2. This had exactly the same issue. Nothing in the
virtualhost section was acted on.

Stranger still, if I changed the default documentroot entry of the
httpd.conf file and restarted apache, it had no effect. It's like
there
was another httpd.conf file in use somewhere but there wasn't any on
the
server outside of the apache folder.

Then things got weirder still. If I stopped the apache service itself
(using the service mmc snap-in in windows) it refused to start again.
It
produced the standard popup explaining I should check the event log or
contact the manufacturer of the service. The event log didn't show any
apache based errors, and I cant see anything in any of the files in
the
/log folder of apache. Rebooting the server failed to get the apache
service working. The only way to get the service up and working is to
totally reinstall apache again, which works, but I'm still left with
the
non-working virtualhost entries and the seemingly unread httpd.conf
file.

ARRGHH!!!!!

Now, im no apache guru, but I have setup enough apache 1.3 and v2
boxes
running windows to know how to setup an apache install to support
several virtualhosts and all the gubbins that go with it. However, im
at
a loss to explain what the h**l is happening now.

Can anyone shed any light on these weird issues? Anyone know how I can
even find out more info about what apache is or isn't reading from the
httpd.conf file ?

Olly

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux