Re: Сервер начал затыкаться

greenh greenh на gmail.com
Вт Ноя 16 18:58:42 MSK 2010


2010/11/16 greenh <greenh на gmail.com>:
> После увеличения нагрузки (несколько проектов, часть из них - обмен
> инфой с программой клиентом) сервер начал затыкаться
> Это выглядит в браузере как
> "Во время загрузки страницы соединение с сервером было сброшено."
> При этом перестает отвечать фтп, ssh
>
> такое ощущение, что ему не хватает то ли буферов, то ли еще чего. хотя
> вроде всего достаточно
> Подскажите плз, куда смотреть?
>
>
> #netstat -m
> 6190/15575/21765 mbufs in use (current/cache/total)
> 3539/12281/15820/262144 mbuf clusters in use (current/cache/total/max)
> 3539/12205 mbuf+clusters out of packet secondary zone in use (current/cache)
> 387/474/861/12800 4k (page size) jumbo clusters in use (current/cache/total/max)
> 0/0/0/6400 9k jumbo clusters in use (current/cache/total/max)
> 0/0/0/3200 16k jumbo clusters in use (current/cache/total/max)
> 10173K/30351K/40525K bytes allocated to network (current/cache/total)
> 0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
> 0/0/0 requests for jumbo clusters denied (4k/9k/16k)
> 0/0/0 sfbufs in use (current/peak/max)
> 0 requests for sfbufs denied
> 0 requests for sfbufs delayed
> 74700 requests for I/O initiated by sendfile
> 0 calls to protocol drain routines
>
>
>  nginx/0.8.53
>
> user www www;
> worker_processes 100;
> worker_rlimit_nofile 32768;
> pid /var/run/nginx.pid;
> events {
> worker_connections 32768;
> use kqueue;
> }
>
> http {
> default_type application/octet-stream;
> client_header_timeout 400;
> client_body_timeout 400;
> send_timeout 400;
> proxy_read_timeout 400;
> proxy_connect_timeout 400;
> proxy_send_timeout 400;
> proxy_buffer_size 32k;
> proxy_buffers 8 64k;
> proxy_busy_buffers_size 256k;
> proxy_temp_file_write_size 256k;
> gzip on;
> gzip_min_length  1100;
> gzip_comp_level 9;
> gzip_http_version 1.0;
> gzip_proxied any;
> gzip_types text/plain text/css applievo3ion/x-javascript text/xml
> applievo3ion/xml applievo3ion/xml+rss text/javascript;
>
> client_max_body_size 950m;
> client_body_buffer_size 128k;
> client_header_buffer_size 1k;
> large_client_header_buffers 4 4k;
> sendfile on;
> tcp_nopush on;
> tcp_nodelay on;
> output_buffers 1 32k;
> postpone_output 1460;
> lingering_time 30;
> lingering_timeout 6;
> reset_timedout_connection on;
> keepalive_timeout 60;
> optimize_server_names on;
> server_names_hash_bucket_size 64;
> include mime.types;
> include virtual.conf;
>

 netstat -s -p tcp
tcp:
        816583 packets sent
                507964 data packets (465547044 bytes)
                40516 data packets (35674842 bytes) retransmitted
                2762 data packets unnecessarily retransmitted
                6 resends initiated by MTU discovery
                221985 ack-only packets (6081 delayed)
                0 URG only packets
                6 window probe packets
                7787 window update packets
                40711 control packets
        1095644 packets received
                462628 acks (for 459589873 bytes)
                71120 duplicate acks
                0 acks for unsent data
                293599 packets (119632941 bytes) received in-sequence
                7511 completely duplicate packets (2339175 bytes)
                0 old duplicate packets
                18 packets with some dup. data (6845 bytes duped)
                3206 out-of-order packets (4465325 bytes)
                2 packets (0 bytes) of data after window
                0 window probes
                1912 window update packets
                308 packets received after close
                4 discarded for bad checksums
                0 discarded for bad header offset fields
                0 discarded because packet too short
                0 discarded due to memory problems
        262 connection requests
        65885 connection accepts
        0 bad connection attempts
        127296 listen queue overflows
        8894 ignored RSTs in the windows
        66142 connections established (including accepts)
        40935 connections closed (including 8969 drops)
                25436 connections updated cached RTT on close
                25492 connections updated cached RTT variance on close
                5496 connections updated cached ssthresh on close
        5 embryonic connections dropped
        284385 segments updated rtt (of 306277 attempts)
        33150 retransmit timeouts
                16 connections dropped by rexmit timeout
        6 persist timeouts
                0 connections dropped by persist timeout
        0 Connections (fin_wait_2) dropped because of timeout
        0 keepalive timeouts
0 keepalive probes sent
                0 connections dropped by keepalive
        35823 correct ACK header predictions
        167638 correct data packet header predictions
        141145 syncache entries added
                19709 retransmitted
                11313 dupsyn
                8 dropped
                65885 completed
                0 bucket overflow
                0 cache overflow
                1540 reset
                2778 stale
                127296 aborted
                0 badack
                6 unreach
                0 zone failures
        141153 cookies sent
        57186 cookies received
        3667 SACK recovery episodes
        6480 segment rexmits in SACK recovery episodes
        9141592 byte rexmits in SACK recovery episodes
        31843 SACK options (SACK blocks) received
        3052 SACK options (SACK blocks) sent
        0 SACK scoreboard overflow
        0 packets with ECN CE bit set
        0 packets with ECN ECT(0) bit set
        0 packets with ECN ECT(1) bit set
        0 successful ECN handshakes
        0 times ECN reduced the congestion window



Подробная информация о списке рассылки nginx-ru