|
Home > Archive > Web Servers on Unix and Linux > April 2006 > Debugging server hanging
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Debugging server hanging
|
|
| meng.frank@gmail.com 2006-04-02, 7:18 pm |
| This is a very generic question, I don't know if there is an answer.
If I have a web server, it is hanging or very slow.
How can I debug where the problem is?
Suppose the hardware is alright and disk is not full.
I want to find out what is wrong instead of just rebooting the server.
Any suggestion will be appreciated.
| |
| Rainer Temme 2006-04-02, 7:18 pm |
| meng.frank@gmail.com wrote:
> If I have a web server, it is hanging or very slow.
> How can I debug where the problem is?
Frank,
run tcpdump to sniff port 80 (or whereever your server listens
to) to inspect the traffic.
If on linux, run strace to see what the serverprocess does.
(strace will usually require some parameters for ...
....attaching to a certain process,
....trace forked children as well
....outputfilename
etc.
Since you've no idea what the reason could be there is
only this very general advice.
Rainer
| |
| Thomas Maier-Komor 2006-04-02, 7:18 pm |
| -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
meng.frank@gmail.com wrote:
> This is a very generic question, I don't know if there is an answer.
> If I have a web server, it is hanging or very slow.
> How can I debug where the problem is?
> Suppose the hardware is alright and disk is not full.
> I want to find out what is wrong instead of just rebooting the server.
> Any suggestion will be appreciated.
>
It strongly depends on the operating system what kind of tools are
available to analyze these kinds of situations. But the tools are worth
nothing if you don't know how to use them. So you will need good docs, too.
On Solaris there is a whole bunch of tools available for exactly this
kind of problem. E.g.:
- - iostat, vmstat, prstat, mpstat, netstat, ...
- - truss
- - dtrace
- - ...
Ask you OS vendor.
Cheers,
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (SunOS)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFELE+P6U+hp8PKQZIRAiSfAJ9nc1Dirszf
cbHTuFXwtZ/m8wWR3QCfb7Mq
D40/zIcKjMxiMQ+k04+7Q1g=
=j7tF
-----END PGP SIGNATURE-----
| |
| Stefan Ruppert 2006-04-02, 7:18 pm |
| meng.frank@gmail.com wrote:
> This is a very generic question, I don't know if there is an answer.
> If I have a web server, it is hanging or very slow.
> How can I debug where the problem is?
> Suppose the hardware is alright and disk is not full.
> I want to find out what is wrong instead of just rebooting the server.
> Any suggestion will be appreciated.
>
Well, maybe you can use mod_arm4 and an ARM 4.0 implementation to trace
if a certain HTTP Request (for example a specific CGI program) causes
the "hanging" or executes for a very long time.
With the mod_arm4 module and an ARM 4.0 implementation the response time
of any request to apache2 server can be monitored. If you store the
measurements in a database for example you can analyse each HTTP request
offline.
Regards,
Stefan
--
Stefan Ruppert <stefan.ruppert@myarm.de> MyARM GbR
CEO/Head of Development Neue Str. 4
Phone: +49 6192/9772818 63571 Gelnhausen-Roth
Web: http://www.myarm.de Germany
MyARM: Application Response Measurement tools for C/C++ and Java
| |
| Wolfgang Riedel 2006-04-02, 7:18 pm |
| RGVtbWVsQUc6U2NoZWlkZWdnXzAx
Thomas Maier-Komor wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> meng.frank@gmail.com wrote:
>
> It strongly depends on the operating system what kind of tools are
> available to analyze these kinds of situations. But the tools are worth
> nothing if you don't know how to use them. So you will need good docs, too.
>
> On Solaris there is a whole bunch of tools available for exactly this
> kind of problem. E.g.:
> - - iostat, vmstat, prstat, mpstat, netstat, ...
> - - truss
> - - dtrace
> - - ...
>
> Ask you OS vendor.
>
> Cheers,
> Tom
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (SunOS)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFELE+P6U+hp8PKQZIRAiSfAJ9nc1Dirszf
cbHTuFXwtZ/m8wWR3QCfb7Mq
> D40/zIcKjMxiMQ+k04+7Q1g=
> =j7tF
> -----END PGP SIGNATURE-----
|
|
|
|
|