(apache) Long waiting time before first response

  • Hi together,


    for my wordpress site running on a vps set up with imscp I noticed long waiting time until the first server response (~2sec)


    So I tried to trace the issuer back but being stuck at correctly interpreting the strace output:

    Code
    1. 9578 0.016328 socket(PF_FILE, SOCK_STREAM, 0) = 22
    2. 9578 0.000203 connect(22, {sa_family=AF_FILE, path="/var/run/php5-fpm-ratgeber-reise.info.socket"}, 46) = 0
    3. 9578 0.000289 fcntl64(22, F_GETFL) = 0x2 (flags O_RDWR)
    4. 9578 0.000127 fcntl64(22, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    5. 9578 0.000104 select(23, [22], [22], NULL, {300, 0}) = 1 (out [22], left {299, 999996})
    6. 9578 0.000165 write(22, "\1\1\0\1\0\10\0\0\0\1\0\0\0\0\0\0\1\4\0\1\0\33\0\0\20\tREDIRECT_HANDLERphp5-fcgi\1\4\0\1\0\24\0\0\17\3REDIRECT_STATUS200\1\4\0\1\0\"\0\0\t\27HTTP_HOSTdev.ratgeber-reise.info\1\4\0\1\0\"\0\0\4\34PATH/usr/local/bin:/usr/bin:/bin\1\4\0\1\0f\0\0\20TSERVER_SIGNATURE<address>Apache/2.2.22 (Ubuntu) Server at dev.ratgeber-reise.info Port 80</address>\n\1\4\0\1\0'\0\0\17\26SERVER_SOFTWAREApache/2.2.22 (Ubuntu)\1\4\0\1\0$\0\0\v\27SERVER_NAMEdev.ratgeber-reise.info\1\4\0\1\0\32\0\0\v\rSERVER_ADDR46.252.25.181\1\4\0\1\0\17\0\0\v\2SERVER_PORT80\1\4\0\1\0\32\0\0\v\rREMOTE_ADDR46.252.25.181\1\4\0\1\0>\0\0\r/DOCUMENT_ROOT/var/www/virtual/ratgeber-reise.info/dev/htdocs\1\4\0\1\0/\0\0\[email protected]\1\4\0\1\0K\0\0\17:SCRIPT_FILENAME/var/lib/apache2/fastcgi/php5-fcgi-dev.ratgeber-reise.info\1\4\0\1\0\22\0\0\v\5REMOTE_PORT41561\1\4\0\1\0\31\0\0\24\3REDIRECT_REMOTE_USERdev\1\4\0\1\0\30\0\0\f\nREDIRECT_URL/index.php\1\4\0\1\0*\0\0\22\26HTTP_AUTHORIZATIONBasic ZGV2OnJyZGV2MQ==\1\4\0\1\0\32\0\0\21\7GATEWAY_INTERFACECGI/1.1\1\4\0\1\0\31\0\0\17\10SERVER_PROTOCOLHTTP/1.1\1\4\0\1\0\23\0\0\16\3REQUEST_METHODGET\1\4\0\1\0\16\0\0\f\0QUERY_STRING\1\4\0\1\0\16\0\0\v\1REQUEST_URI/\1\4\0\1\0\27\0\0\v\nSCRIPT_NAME/php5-fcgi\1\4\0\1\0\25\0\0\t\nPATH_INFO/index.php\1\4\0\1\0J\0\0\0179PATH_TRANSLATED/var/www/virtual/ratgeber-reise.info/dev/htdocs/index.php\1\4\0\1\0\0\0\0\1\5\0\1\0\0\0\0", 1100) = 1100
    7. 9578 0.000600 select(23, [22], [], NULL, {300, 0}) = 1 (in [22], left {298, 102460})
    8. 9578 1.897819 read(22, "\1\6\0\1\0a\7\0X-Pingback: http://dev.ratgeber-reise.info/xmlrpc.php\r\nContent-Type: [...]


    That means that system call 'select(23, [22], [], NULL, {300, 0}) = 1 (in [22], left {298, 102460})' takes 1.897819s to execute, right?
    So is this issue related to php-fpm? Can anyone help me to trace back this issue further?



    TIA lorus

  • Hello ;


    This problem doesn't belong to i-MSCP itself. Why you do not post on wp forum or even better on PHP specialized forum? I'l would recommend you to tune your sysctl a bit anyway. ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206