>Можно посмотреть ps, может показать в каком вызове ядра заблокировался процесс
>ps -eo pid,state,wchan=WCHAN__________,time,comm вот сейчас завис nginx, вот команда что хотели посмотреть:
# ps -eo pid,state,wchan=WCHAN__________,time,comm
ps: Process environment requires procfs(5)
PID STAT WCHAN__________,time,comm
825 Is+ ttyin
826 Is+ ttyin
827 Is+ ttyin
828 Is+ ttyin
829 Is+ ttyin
830 Is+ ttyin
831 Is+ ttyin
832 Is+ ttyin
21774 I wait
21775 I pause
21778 S+ pause
5724 Is pause
5727 S+ select
5729 Ss pause
21810 R+ -
все здесь процессы - это терминалы или мои сессии (21774-78, 5724-29) - что это дает эта информация?
вот еще информация top:
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
732 mysql 9 20 0 56840K 24608K kserel 0 54:29 0.00% mysqld
788 nobody 1 -16 0 4076K 2692K zoneli 1 16:43 0.00% nginx
786 nobody 1 -16 0 4096K 2688K zoneli 1 16:36 0.00% nginx
784 nobody 1 -16 0 8656K 6804K zoneli 1 16:36 0.00% nginx
789 nobody 1 -16 0 14608K 13200K zoneli 1 16:33 0.00% nginx
785 nobody 1 -16 0 11144K 9772K zoneli 1 16:26 0.00% nginx
790 nobody 1 -16 0 25072K 21988K zoneli 1 16:22 0.00% nginx
792 nobody 1 -16 0 4344K 2920K zoneli 1 16:15 0.00% nginx
791 nobody 1 -16 0 4128K 2748K zoneli 1 16:09 0.00% nginx
793 nobody 1 -16 0 23312K 20324K zoneli 1 16:03 0.00% nginx
794 nobody 1 -16 0 4068K 2688K zoneli 1 16:02 0.00% nginx
18887 nobody 1 4 0 15508K 10680K accept 0 1:54 0.00% httpd
18892 nobody 1 4 0 15496K 10564K accept 0 1:52 0.00% httpd
18889 nobody 1 -16 0 15508K 10688K zoneli 1 1:52 0.00% httpd
18894 nobody 1 -16 0 15560K 10588K zoneli 1 1:52 0.00% httpd
18886 nobody 1 -16 0 15508K 10500K zoneli 1 1:52 0.00% httpd
18908 nobody 1 4 0 15516K 10660K accept 0 1:51 0.00% httpd
18890 nobody 1 -16 0 15668K 10672K zoneli 1 1:51 0.00% httpd
главный master-процесс nginx был с pid=779
вот еще информация на этот момент - команда "vmstat -z":
ITEM SIZE LIMIT USED FREE REQUESTS FAILURES
UMA Kegs: 140, 0, 69, 3, 69, 0
UMA Zones: 480, 0, 69, 3, 69, 0
UMA Slabs: 64, 0, 1731, 98, 41864, 0
UMA RCntSlabs: 104, 0, 12800, 2, 207600, 0
UMA Hash: 128, 0, 3, 27, 6, 0
16 Bucket: 76, 0, 21, 29, 83, 0
32 Bucket: 140, 0, 33, 23, 155, 0
64 Bucket: 268, 0, 20, 50, 225, 22
128 Bucket: 524, 0, 1391, 2, 180466, 224864
VM OBJECT: 132, 0, 58005, 34360, 2040011, 0
MAP: 192, 0, 7, 13, 7, 0
KMAP ENTRY: 68, 57344, 22, 3786, 672522, 0
MAP ENTRY: 68, 0, 4591, 1513, 13700352, 0
PV ENTRY: 24, 1745655, 164936, 104619, 102374314, 0
DP fakepg: 72, 0, 0, 0, 0, 0
mt_zone: 1024, 0, 214, 2, 214, 0
16: 16, 0, 2636, 5687, 230794474, 0
32: 32, 0, 1848, 525, 134147789, 0
64: 64, 0, 4705, 1313, 133718455, 0
128: 128, 0, 2124, 786, 4231761, 0
256: 256, 0, 725, 325, 487033, 0
512: 512, 0, 207, 417, 117526, 0
1024: 1024, 0, 94, 254, 3101380, 0
2048: 2048, 0, 1251, 203, 49703, 0
4096: 4096, 0, 171, 205, 27845, 0
Files: 72, 0, 646, 1633, 189409258, 0
PROC: 536, 0, 130, 94, 21816, 0
THREAD: 376, 0, 239, 331, 1108009, 0
KSEGRP: 88, 0, 231, 369, 372910, 0
UPCALL: 44, 0, 11, 379, 372690, 0
VMSPACE: 296, 0, 95, 100, 21781, 0
mbuf_packet: 256, 0, 814, 24811, 737820069, 16697
mbuf: 256, 0, 49, 1190, 1889198987, 0
mbuf_cluster: 2048, 25600, 25600, 0, 4703760, 19414
mbuf_jumbo_pagesize: 4096, 0, 0, 0, 0, 0
mbuf_jumbo_9k: 9216, 0, 0, 0, 0, 0
mbuf_jumbo_16k: 16384, 0, 0, 0, 0, 0
ACL UMA zone: 388, 0, 0, 0, 0, 0
g_bio: 132, 0, 0, 812, 18736572, 0
ata_request: 204, 0, 0, 342, 4841528, 0
ata_composite: 196, 0, 0, 0, 0, 0
VNODE: 272, 0, 56967, 34523, 2635338, 0
VNODEPOLL: 76, 0, 0, 0, 0, 0
NAMEI: 1024, 0, 0, 260, 351918775, 0
S VFS Cache: 68, 0, 66028, 33484, 2595681, 0
L VFS Cache: 291, 0, 394, 711, 24402, 0
DIRHASH: 1024, 0, 736, 528, 7654, 0
NFSMOUNT: 480, 0, 0, 0, 0, 0
NFSNODE: 460, 0, 0, 0, 0, 0
PIPE: 408, 0, 2, 178, 11154, 0
KNOTE: 68, 0, 417, 2663, 310571914, 0
socket: 356, 25608, 537, 2499, 33353009, 0
ipq: 32, 904, 0, 339, 491, 0
udpcb: 180, 25608, 7, 81, 233479, 0
inpcb: 180, 25608, 363, 7777, 32372502, 0
tcpcb: 464, 25600, 363, 2637, 32372502, 0
tcptw: 48, 5148, 0, 5148, 14320231, 555431
syncache: 100, 15366, 0, 390, 19005755, 0
hostcache: 76, 15400, 5178, 4722, 554444, 0
tcpreass: 20, 1690, 0, 507, 143373, 0
sackhole: 20, 0, 0, 507, 8844765, 0
ripcb: 180, 25608, 0, 66, 70, 0
unpcb: 140, 25620, 39, 101, 746957, 0
rtentry: 132, 0, 10, 48, 10, 0
divcb: 180, 25608, 0, 0, 0, 0
IPFW dynamic rule zone: 108, 0, 0, 0, 0, 0
SWAPMETA: 276, 121576, 7, 91, 358, 0
Mountpoints: 664, 0, 7, 5, 7, 0
FFS inode: 132, 0, 56927, 34046, 2635237, 0
FFS1 dinode: 128, 0, 0, 0, 0, 0
FFS2 dinode: 256, 0, 56927, 33628, 2635237, 0
в логе error.log на момент зависа вот такие строки:
2007/08/24 12:51:05 [info] 791#0: *18776303 kevent() reported that client 70.54.16.143 closed keepalive connec
tion
2007/08/24 12:51:06 [info] 791#0: *18776305 kevent() reported that client 70.54.16.143 closed keepalive connec
tion
2007/08/24 12:51:08 [info] 786#0: *18777417 client sent invalid header line: "~~~~~~~: ~~~~:~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" while reading client request headers, client: 149.135.114.178, server:
xxxxxxxxxxxxxxx.xxx, URL: "/xxxxxxxxxxxx/xxxx/xxxxxxxxxxxx"
2007/08/24 12:51:08 [info] 786#0: *18777417 client sent invalid header line: "~~~~~~~~~~~~~~~: ~~~~~ ~~~~~~~"
while reading client request headers, client: 149.135.114.178, server: xxxxxxxxxxxxxxx.xxx, URL: "/xxxxxxxxxxxx/xxxx/xxxxxxxxxxxx"
2007/08/24 12:51:08 [info] 786#0: *18777412 kevent() reported that client closed prematurely connection, so up
stream connection is closed too while sending request to upstream, client: 217.93.60.253, server: www.xxxxxxxxxxxxx.xxx, URL: "/xxxxxxxxxxx", upstream: "http://127.0.0.1:80/xxxxxxxxxxx", host: "www.xxxxxxxxxxxxx.xxx"
2007/08/24 12:51:09 [info] 788#0: *18777430 client sent invalid header line: "~~~~~~~: ~~~~:~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" while reading client request headers, client: 149.135.114.178, server:
xxxxxxxxxxxxxxx.xxx, URL: "/xxxxxxxxxxxx/xxxx/xxxxxxxxxxxx"
2007/08/24 12:51:09 [info] 788#0: *18777430 client sent invalid header line: "~~~~~~~~~~~~~~~: ~~~~~ ~~~~~~~"
while reading client request headers, client: 149.135.114.178, server: xxxxxxxxxxxxxxx.xxx" URL: "/xxxxxxxxxxxx/xxxx/xxxxxxxxxxxx"
2007/08/24 13:07:00 [notice] 779#0: signal 30 (SIGUSR1) received, reopening logs
2007/08/24 13:07:00 [notice] 779#0: reopening logs
Знаками xxxxxxx я убрал приватную информацию
Получается, что в логе нет ничего необычного?
Надеюсь знающие гуру посмотрят и подскажут где слабое место
Спасибо!