NginX+FPM very slow - How can i boost?

Discussion in 'Server Operation' started by uniQueX, Apr 13, 2015.

  1. uniQueX

    uniQueX New Member

    Hello,

    i have a big problem and hope that you can help me. i have a media service (streaming, downloading contents with proxy service) with round about 30k requests per day (rising trend). sometimes the load is so high that a visit to the page takes about 30 seconds or more. somtimes you'll get just a 504 Gateway timedout . This problem is sinced i switched php5-fpm from 127.0.0.1:9000 to "fastcgi_pass unix:/var/run/php5-fpm.sock"
    i don't know where it comes from or what the source. The RAM ist nearly empty. The Down-/+Uploadrate is ~20%.
    If the load is too high, you can no longer visit the site.
    Sometimes I see at the logfiles that some customers connect several thousand requests per download link. Others need for the same download 5-10 requests.
    (Depending on the client or downloadprogram.) In this case, requests will be processed only slowly and with difficulty.

    what can i do to boost my configs? i am using nginx+php-fpm & debian 7.
    I am grateful for every tip, for any help and support.

    here are my configs:

    My Hardware:
    My Hardware:
    CPU: Intel(R) Xeon(R) CPU E3-1230 v3 @ 3.30GHz
    Cores: 4 physical + 4 virtual cores (hyperthreading)
    RAM: MemTotal: 32849608 kB
    Bandwidth: 300mbps
    IP's: 2
    HDD: SSD Raid1

    nginx.conf: http://pastebin.com/6usBQbrX

    vhost.conf: http://pastebin.com/TTqyMbnX

    fastcgi_params: http://pastebin.com/pDAxN3KG

    mime.types: http://pastebin.com/0fsMWEZ5

    /etc/php5/fpm/pool.d/www.conf: http://pastebin.com/sgDuybqj
    Code:
    listen = /var/run/php5-fpm.sock
    pm = ondemand
    pm.max_children = 500
    pm.start_servers = 25
    pm.min_spare_servers = 25
    pm.max_spare_servers = 75
    pm.max_requests = 0
    
    /etc/php5/fpm/php5-fpm.conf: http://pastebin.com/Pg3cX0zA

    php.ini: http://pastebin.com/z3hRYEmz

    thanks a lot
     

Share This Page