Safari intermittently hangs when loading FCGI request

Maxim Dounin mdounin at mdounin.ru
Tue Oct 19 12:16:19 MSD 2010


Hello!

On Mon, Oct 18, 2010 at 11:08:13PM +0200, Sen Haerens wrote:

> As you can see in attached debug log there is ±20 second delay before
> returning the page to Safari 5.0.2. Profiling PHP-FPM and PHP script
> itself show that they render under 0.03 seconds. The connection stall is
> not happening in Firefox 3.6.10
> 
> These are the response headers in Safari:
> Connection:close
> Content-Type:text/html
> Date:Mon, 18 Oct 2010 20:56:23 GMT
> Server:nginx/0.8.52
> Transfer-Encoding:Identity
> 
> These are the response headers in Firefox:
> Server: nginx/0.8.52
> Date: Mon, 18 Oct 2010 20:56:02 GMT
> Content-Type: text/html
> Transfer-Encoding: chunked
> Connection: close
> 
> I tested Nginx 0.8.52 with gzip off, keepalive_timeout 0,
> fastcgi_max_temp_file_size 0 but no difference.
> 
> nginx version: nginx/0.8.52
> TLS SNI support enabled
> configure arguments: --conf-path=/etc/nginx/nginx.conf
> --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid
> --lock-path=/var/lock/nginx.lock
> --http-log-path=/var/log/nginx/access.log
> --http-client-body-temp-path=/var/lib/nginx/body
> --http-proxy-temp-path=/var/lib/nginx/proxy
> --http-fastcgi-temp-path=/var/lib/nginx/fastcgi
> --http-uwsgi-temp-path=/var/lib/nginx/uwsgi
> --http-scgi-temp-path=/var/lib/nginx/scgi --with-debug
> --with-http_stub_status_module --with-http_flv_module
> --with-http_ssl_module --with-http_gzip_static_module
> --with-http_realip_module --with-ipv6 --without-mail_pop3_module
> --without-mail_imap_module --without-mail_smtp_module --with-file-aio
> --add-module=/build/buildd/nginx-0.8.52/contrib/nginx-upload-progress-module
> 
> Attachments:
> http://www.ruby-forum.com/attachment/5218/safari.connection.normal.log
> http://www.ruby-forum.com/attachment/5219/safari.connection.slow.log
> http://www.ruby-forum.com/attachment/5220/safari.connection.slow2.log

These logs doesn't contain full logs for any single request.  On 
the other hand, each file contains parts of *two* different 
connection logs.  E.g. in slow2.log:

2010/10/18 23:02:48 [debug] 26728#0: *146 http finalize request: 0, "/index.php?/jobs/" a:1, c:1
2010/10/18 23:03:19 [debug] 26728#0: *151 http finalize request: 0, "/index.php?/estimates/" a:1, c:1

These are two distinct connections, *146 and *151.  Each 
connection itself doesn't seem to be problematic.

Maxim Dounin



More information about the nginx mailing list