Syncroton on nginx worthwhile?
C.T. Beuger
ct.beuger at acc-ict.com
Thu Jun 5 12:35:21 CEST 2014
Hi,
While testing with nginx instead of apache/httpd I notice a lot of 504 (timeout) responses to the ActiveSync ping command.
The goal of the test is to see if memory usage can be lowered by using nginx.
I am using ActiveSync (syncroton) with iOS devices to sync mainly e-mail.
The push function ActiveSync provides is a long lived TCP connection. Syncroton is written in PHP which has a default max_execution_time of 60 seconds.
I raised the timeouts. This is enough when the device is on wifi (900 seconds ping interval) but I have seen much longer periods between a ping POST and the reply by apache.
/etc/php.ini
max_execution_time = 1000
/etc/nginx/conf.d/default.conf
server {
..
location /Microsoft-Server-ActiveSync {
..
fastcgi_read_timeout 1000;
fastcgi_send_timeout 1000;
/etc/php-fpm.d/kolab-syncroton.conf
request_terminate_timeout = 1000
According to this Apple article http://support.apple.com/kb/ts1868 the heartbeat interval should be possible to up to an hour.
Something tells me raising the values above to an hour is wrong. In addition it would not significantly lower the memory consumption compared to apache as each device has its own PHP-FPM process.
I am wondering how apache does this as well as if switching is worthwhile.
Your insights are welcome.
Kind regards,
Chris Beuger
More information about the users
mailing list