server lahmt

Apache, Lighttpd, nginx, Cherokee
Post Reply
afrika123
Posts: 82
Joined: 2005-10-31 12:43
 

server lahmt

Post by afrika123 »

*verzweifel*
ich habe mal einen screenshot vom htop gemacht.
Vielleicht kann sich das ja mal jemand ansehen.
http://www.fly77.de/htop.gif
rootsvr
Posts: 538
Joined: 2005-09-02 11:12
Contact:
 

Re: server lahmt

Post by rootsvr »

Gut ausgelastetes system.. so wie es ausschaut frisst dein mysql jede Menge Rechenleistung. Viele PHP Anwendungen und vielleicht wartet da der mysql auf die Platten?
afrika123
Posts: 82
Joined: 2005-10-31 12:43
 

Re: server lahmt

Post by afrika123 »

afrika123
Posts: 82
Joined: 2005-10-31 12:43
 

Re: server lahmt

Post by afrika123 »

Die Swp ist völlig leer. Ist das vielleicht ein Lösungsansatz?
timeless2
Posts: 415
Joined: 2005-03-04 14:45
Location: Paris
 

Re: server lahmt

Post by timeless2 »

nein, das ist gut (dein Arbeitsspeicher ist also groß genug).

Hast du schon mal die Forensuche verwendet, mit lahmenden Servern und Optimierungsmöglichkeiten gab es schon einige Threads.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: server lahmt

Post by Joe User »

PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
afrika123
Posts: 82
Joined: 2005-10-31 12:43
 

Re: server lahmt

Post by afrika123 »

Was genau bewirkt:
httpd.conf

Code: Select all

<IfModule prefork.c> 
    StartServers         5 
    MinSpareServers      5 
    MaxSpareServers     10 
    ServerLimit        150 
    MaxClients         150 
    MaxRequestsPerChild  0 
</IfModule> 
php.ini

Code: Select all

mysql.allow_persistent = Off
also im Einzelnen. ich habe schon ab und an mehr als 150 User gleichzeitig drauf, und das sollte schon klappen. Das mit den fehlenden Mysql Close leuchtet ein. Welcher Befehl macht das denn?
Das Mysql werde ich mal versuchen auf eine neuere Version zu bringen, zur Zeit läuft 4.0.15 die ist ja auch schon etwas älter.


Das der Server öfters gestartet wird, ist ja auch komisch. Vielleicht eine fehlerhafte Einstellung in der confixx
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: server lahmt

Post by Joe User »

PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
braindead
Posts: 250
Joined: 2002-10-22 09:49
Location: vorm Rechner
 

Re: server lahmt

Post by braindead »

ich würde mal den mysql slow querie log einschalten und mir angucken welche SQL Queries da so viel Last erzeugen.
afrika123
Posts: 82
Joined: 2005-10-31 12:43
 

Re: server lahmt

Post by afrika123 »

So ich habe mal das ServerLimit 150 eingefügt, und das
mysql.allow_persistent auf off gesetzt.
Dannach restart.
Nun folgende Werte , diesmal mit Top:

Code: Select all

top - 02:04:41 up 2 days, 10:12,  1 user,  load average: 0.68, 0.86, 1.00
Tasks:  94 total,   2 running,  92 sleeping,   0 stopped,   0 zombie
Cpu(s):  13.3% user,   6.0% system,   0.0% nice,  72.8% idle,   8.0% IO-wait
Mem:    905288k total,   877120k used,    28168k free,    35024k buffers
Swap:   514072k total,        0k used,   514072k free,   726576k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 4892 wwwrun    15   0 30604 9008 4320 S  5.0  1.0   0:04.55 httpd2-prefork
 5994 wwwrun    15   0 30284 8632 4316 S  1.7  1.0   0:00.43 httpd2-prefork
 6253 wwwrun    16   0 30220 8624 4320 S  1.7  1.0   0:00.51 httpd2-prefork
 5843 wwwrun    15   0 31536 9944 4352 S  1.3  1.1   0:00.97 httpd2-prefork
 4508 wwwrun    16   0 30176 8780 4520 S  1.0  1.0   0:01.57 httpd2-prefork
 5638 wwwrun    16   0 30208 8608 4316 S  1.0  1.0   0:00.78 httpd2-prefork
 5993 wwwrun    16   0 30180 8580 4316 S  0.7  0.9   0:00.44 httpd2-prefork
 4416 root      16   0 29124 7460 4320 S  0.3  0.8   0:00.35 httpd2-prefork
 5655 root      16   0  1952  980  748 R  0.3  0.1   0:00.31 top
 5867 wwwrun    15   0 32344  10m 4336 S  0.3  1.2   0:00.52 httpd2-prefork
    1 root      16   0   696  256  220 S  0.0  0.0   0:00.28 init
    2 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
    3 root      39  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0
    4 root      10  -5     0    0    0 S  0.0  0.0   0:00.04 events/0
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.46 khelper
    6 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kthread
    8 root      10  -5     0    0    0 S  0.0  0.0   0:28.08 kblockd/0
   11 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 khubd
   72 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0
   71 root      15   0     0    0    0 S  0.0  0.0   0:38.60 kswapd0
  654 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
  679 root      16  -5     0    0    0 S  0.0  0.0   0:00.00 ata/0
  690 root      15   0     0    0    0 S  0.0  0.0   0:36.85 kjournald
  760 root      15   0     0    0    0 S  0.0  0.0   0:00.00 kjournald
 1169 root      16   0  1600  228  164 S  0.0  0.0   0:00.00 dhcpcd
 1289 root      16   0  1632  572  480 S  0.0  0.1   0:00.74 syslogd
 1294 root      15   0  1712  560  368 S  0.0  0.1   0:00.02 klogd
 1307 root      20   0  4216  636  440 S  0.0  0.1   0:00.00 saslauthd
 1313 root      19   0  4216  368  172 S  0.0  0.0   0:00.00 saslauthd
 1314 root      21   0  4216  340  144 S  0.0  0.0   0:00.00 saslauthd
 1315 root      20   0  4216  340  144 S  0.0  0.0   0:00.00 saslauthd
 1316 root      20   0  4216  340  144 S  0.0  0.0   0:00.00 saslauthd
 1318 bin       16   0  1604  312  232 S  0.0  0.0   0:00.00 portmap
 1348 root      16   0  2248  824  692 S  0.0  0.1   0:00.07 xinetd
 1366 root      16   0  4992 1004  732 S  0.0  0.1   0:00.08 sshd
 1926 root      15   0  4240 1348 1092 S  0.0  0.1   0:02.22 master
 1938 postfix   16   0  4296 1432 1132 S  0.0  0.2   0:01.75 qmgr
 2004 root      16   0  1776  664  552 S  0.0  0.1   0:00.08 cron
 2006 root      16   0 12352  700  548 S  0.0  0.1   0:01.05 nscd
 2009 root      16   0 12352  700  548 S  0.0  0.1   0:00.16 nscd
 2010 root      15   0 12352  700  548 S  0.0  0.1   0:01.16 nscd
 2011 root      15   0 12352  700  548 S  0.0  0.1   0:00.02 nscd
 2012 root      15   0 12352  700  548 S  0.0  0.1   0:00.04 nscd
 2013 root      15   0 12352  700  548 S  0.0  0.1   0:00.02 nscd
 2014 root      15   0 12352  700  548 S  0.0  0.1   0:00.03 nscd
 2021 root      18   0  1576  516  452 S  0.0  0.1   0:00.02 mingetty
 2023 root      18   0  1576  520  452 S  0.0  0.1   0:00.03 mingetty
 2024 root      18   0  1576  520  452 S  0.0  0.1   0:00.01 mingetty
 2025 root      18   0  1576  520  452 S  0.0  0.1   0:00.02 mingetty
 2026 root      18   0  1572  516  452 S  0.0  0.1   0:00.02 mingetty
 2028 root      18   0  1572  512  452 S  0.0  0.1   0:00.02 mingetty
 2029 root      16   0  1580  500  436 S  0.0  0.1   0:00.00 agetty
21001 root      15   0     0    0    0 S  0.0  0.0   0:02.29 pdflush
27661 root      15   0     0    0    0 S  0.0  0.0   0:01.78 pdflush
17237 root      22   0  2532 1092  900 S  0.0  0.1   0:00.00 mysqld_safe
braindead
Posts: 250
Joined: 2002-10-22 09:49
Location: vorm Rechner
 

Re: server lahmt

Post by braindead »

ich würde mal sagen das ist nicht ganz repräsentativ da zu der Zeit wohl eindeutig weniger Leute auf dem Server waren (es laufen viel weniger Apache Prozesse). Ich würde das ganze nochmal beobachten.
afrika123
Posts: 82
Joined: 2005-10-31 12:43
 

Re: server lahmt

Post by afrika123 »

Ok, nun habe ich ihn gerade erwischt wo er wieder hängt.

Code: Select all

top - 17:43:22 up 3 days,  1:51,  1 user,  load average: 6.38, 4.97, 6.50
Tasks: 161 total,   4 running, 157 sleeping,   0 stopped,   0 zombie
Cpu(s):  57.9% user,  13.2% system,   0.0% nice,   0.0% idle,  28.9% IO-wait
Mem:    905288k total,   895840k used,     9448k free,    27152k buffers
Swap:   514072k total,        0k used,   514072k free,   596068k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
11617 wwwrun    15   0 30012 8632 4332 S 20.6  1.0   0:05.29 httpd2-prefork
11696 wwwrun    16   0 32028  10m 4496 S  3.3  1.2   0:00.80 httpd2-prefork
11301 mysql     16   0 24812  20m 2792 D  2.9  2.3   0:05.88 mysqld
 8820 wwwrun    15   0 31620  10m 4748 S  2.0  1.2   0:01.13 httpd2-prefork
10518 wwwrun    15   0 30056 8800 4504 S  2.0  1.0   0:00.66 httpd2-prefork
10368 wwwrun    15   0 31876  10m 4644 S  1.6  1.2   0:00.81 httpd2-prefork
11995 wwwrun    15   0 29948 8548 4312 S  1.6  0.9   0:00.38 httpd2-prefork
12270 wwwrun    16   0 29924 8692 4480 S  1.6  1.0   0:00.19 httpd2-prefork
12726 wwwrun    15   0 30012 8456 4180 S  1.6  0.9   0:00.10 httpd2-prefork
12922 wwwrun    15   0 29892 8332 4156 S  1.6  0.9   0:00.10 httpd2-prefork
12923 wwwrun    15   0 29948 8316 4156 S  1.6  0.9   0:00.09 httpd2-prefork
11146 wwwrun    15   0 30028 8924 4608 S  1.3  1.0   0:00.64 httpd2-prefork
12888 wwwrun    15   0 29884 7908 3816 D  1.3  0.9   0:00.05 httpd2-prefork
 7358 wwwrun    15   0 32448  11m 4696 S  1.0  1.3   0:11.03 httpd2-prefork
 9130 wwwrun    15   0 32088  10m 4748 S  1.0  1.2   0:01.16 httpd2-prefork
11087 wwwrun    15   0 31136 9468 4164 S  1.0  1.0   0:02.53 httpd2-prefork
 6226 wwwrun    15   0 32104  10m 4692 S  0.7  1.2   0:02.17 httpd2-prefork
 8265 wwwrun    16   0 29940 8652 4428 S  0.7  1.0   0:00.48 httpd2-prefork
12373 wwwrun    15   0 30016 8720 4420 S  0.7  1.0   0:00.21 httpd2-prefork
12729 wwwrun    15   0 29960 8360 4184 S  0.7  0.9   0:00.11 httpd2-prefork
12889 wwwrun    16   0 29844 8088 4020 D  0.7  0.9   0:00.06 httpd2-prefork
12919 wwwrun    15   0 29892 8332 4156 S  0.7  0.9   0:00.13 httpd2-prefork
11900 wwwrun    15   0 29904 8376 4188 S  0.3  0.9   0:00.29 httpd2-prefork
12191 wwwrun    15   0 29900 8712 4528 S  0.3  1.0   0:00.57 httpd2-prefork
12281 wwwrun    15   0 29968 8616 4364 S  0.3  1.0   0:00.14 httpd2-prefork
12576 root      16   0  2080 1020  744 R  0.3  0.1   0:00.15 top
12924 wwwrun    16   0 29944 8276 4140 S  0.3  0.9   0:00.04 httpd2-prefork
    1 root      16   0   696  256  220 S  0.0  0.0   0:00.30 init
    2 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
    3 root      39  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0
    4 root      10  -5     0    0    0 S  0.0  0.0   0:00.07 events/0
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.59 khelper
    6 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kthread
    8 root      10  -5     0    0    0 S  0.0  0.0   0:34.86 kblockd/0
   11 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 khubd
   72 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0
   71 root      15   0     0    0    0 S  0.0  0.0   0:48.23 kswapd0
  654 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
  679 root      16  -5     0    0    0 S  0.0  0.0   0:00.00 ata/0
  690 root      15   0     0    0    0 D  0.0  0.0   0:46.05 kjournald
  760 root      15   0     0    0    0 S  0.0  0.0   0:00.00 kjournald
 1169 root      16   0  1600  228  164 S  0.0  0.0   0:00.00 dhcpcd
 1289 root      16   0  1632  572  480 S  0.0  0.1   0:00.81 syslogd
 1294 root      15   0  1712  560  368 S  0.0  0.1   0:00.02 klogd
 1307 root      16   0  4216  636  440 S  0.0  0.1   0:00.00 saslauthd
 1313 root      16   0  4464 1168  812 S  0.0  0.1   0:00.00 saslauthd
 1314 root      16   0  4216  340  144 S  0.0  0.0   0:00.00 saslauthd
 1315 root      16   0  4216  368  172 S  0.0  0.0   0:00.00 saslauthd
 1316 root      16   0  4216  340  144 S  0.0  0.0   0:00.00 saslauthd
 1318 bin       16   0  1604  312  232 S  0.0  0.0   0:00.00 portmap
 1348 root      15   0  2248  824  692 S  0.0  0.1   0:00.10 xinetd
 1366 root      16   0  4992 1004  732 S  0.0  0.1   0:00.09 sshd
 1926 root      16   0  4240 1348 1092 S  0.0  0.1   0:02.73 master
 1938 postfix   16   0  4296 1432 1132 S  0.0  0.2   0:02.09 qmgr
 2004 root      16   0  1776  664  552 S  0.0  0.1   0:00.09 cron
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: server lahmt

Post by Joe User »

Code: Select all

ps auxf
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
afrika123
Posts: 82
Joined: 2005-10-31 12:43
 

Re: server lahmt

Post by afrika123 »

afrika123
Posts: 82
Joined: 2005-10-31 12:43
 

Re: server lahmt

Post by afrika123 »

Joe User wrote:

Code: Select all

ps auxf
http://www.fly77.de/ps-auxf.txt
braindead
Posts: 250
Joined: 2002-10-22 09:49
Location: vorm Rechner
 

Re: server lahmt

Post by braindead »

ich würde mal sagen der Apache braucht ein wenig zu viel Leistung und irgendwie scheint deine Platte ein wenig zu lahmen (29% IO-Wait). Stell mal auf Apache worker um und check mal was da so viel auf der Platte rumsucht (ich würde auf den mysql tippen).
afrika123
Posts: 82
Joined: 2005-10-31 12:43
 

Re: server lahmt

Post by afrika123 »

Ich hatte nach der Modifikation der http.conf und der php.ini "nur" einen Apache stop > start gemacht.
Ich probiers jetzt mal mit reboot. Mal sehen ob es dann irgendwie besser wird.
Mysql habe ich auch im Verdacht, da noch eine ältere Version läuft (4.0.15) und ich das nicht updaten kann.
Vielleicht hilft query cache da vorerst

PS reboot hat auch nicht geholfen :(

PPS IO ist jetzt auf 62%
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: server lahmt

Post by Joe User »

Probiere es mal mit (httpd.conf):

Code: Select all

KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
    StartServers         5
    MinSpareServers      5
    MaxSpareServers     10
    MaxClients         150
    MaxRequestsPerChild 100
</IfModule>
Wenn es nicht reicht, kannst Du MaxRequestsPerChield in 10er-Schritten noch bis auf 50 reduzieren, aber nicht tiefer...
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
braindead
Posts: 250
Joined: 2002-10-22 09:49
Location: vorm Rechner
 

Re: server lahmt

Post by braindead »

warum sollte der reboot auch helfen?!? Untersuch doch mal die apache module und den mysql...
afrika123
Posts: 82
Joined: 2005-10-31 12:43
 

Re: server lahmt

Post by afrika123 »

So ich habe mal alles was so verändert wurde hier:
http://www.fly77.de/erweiter.conf.txt

Die http.conf:
http://www.fly77.de/httpd.conf.txt

vielleicht ist da ein Fehler drin?

Keep Alive ist jetzt auf Off (nicht wie dort angegeben On)
afrika123
Posts: 82
Joined: 2005-10-31 12:43
 

Re: server lahmt

Post by afrika123 »

Ist wieder am lahmen der gute :(
Post Reply