Timeout issue?



  • Hi everyone,
    I think, I might be having a timeout related issue.

    My setup looks like this: HAProxy -> nginx -> php7-fpm

    After 600s the connection to z-push seems to get terminated and not re-initialized.
    The last thing I see in z-push.log is:

    27/07/2017 19:56:48 [14635] [ INFO] [user@example.com] cmd='Ping' memory='3.81 MiB/6.00 MiB' time='600.88s' devType='iPhone' devId='asdasd' getUser='user@example.com' from='x.x.x.x' idle='600s' version='2.3.7+0' method='POST' httpcode='200'
    

    There’s nothing in z-push-error.log.
    I also can’t find any errors in any other logfiles (haproxy, nginx, php-fpm).

    My location-block in nginx looks like this:

        location /Microsoft-Server-ActiveSync {
            root /var/www/html;
            index index.php;
            rewrite ^(.*)$  /Microsoft-Server-ActiveSync/index.php last;
            location ~ ^/Microsoft-Server-ActiveSync/(.+\.php)$ {
                root /var/www/html;
                fastcgi_param PHP_FLAG "magic_quotes_gpc=off \n register_globals=off \n magic_quotes_runtime=off \n short_open_tag=on";
                fastcgi_param PHP_VALUE "post_max_size=31M \n upload_max_filesize=30M \n max_execution_time=3660";
                include /etc/nginx/fastcgi_params;
                fastcgi_index index.php;
                fastcgi_param HTTPS on;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
                fastcgi_read_timeout 3660;
            }
        }
    

    Does anyone have an idea where to look or how to debug this issue any further?

    Thanks in advance


  • Kopano

    Hi @philphonic ,

    did you check the timeout values in haproxy?



  • Hi @fbartels,

    these are the timeout settings for haproxy:

        timeout http-request      10s
        timeout queue             1m
        timeout connect           10s
        timeout client            1m
        timeout server            1m
        timeout http-keep-alive   10s
        timeout check             10s
        timeout tunnel            15m
        timeout client-fin        30s
    

    While writing this and thinking about it, I think I’ve found the problem.
    I’ve set timeout server and timeout client to 660s. For the moment this seems to work, but I’ll have a more detailed look into it.



  • These settings seem to work, but something is confusing me.
    In “z-push-top”, I sometimes see “Xs/915s sink”. I thought 600s is the maximum.
    Can anyone explain this “915s” any further?


  • Kopano

    Hi philphonic,

    @philphonic said in Timeout issue?:

    These settings seem to work, but something is confusing me.
    In “z-push-top”, I sometimes see “Xs/915s sink”. I thought 600s is the maximum.
    Can anyone explain this “915s” any further?

    600s is the default value to wait for change. However devices are able to set themselves how long they’re going to wait for changes and this value might be between 60 and 3540 seconds (59 minutes).

    Manfred



  • Hi Manfred,

    thanks for clarifying!
    So I think setting the timeout to 3600s would be better.


Log in to reply
 

Looks like your connection to Kopano Community Forum was lost, please wait while we try to reconnect.