Curl, Nginx and the connections conundrum.

jakecattrall nginx-forum at
Thu Aug 2 02:32:55 UTC 2012

Hey folks,

I'd like to turn your attentions to this frustrating issue I've been

I'm running a dedicated server... Centos 6, PHP 5.3.3, Nginx 1.0.15.
Great hardware, no problems.

Nginx uses fastcgi to run php.

The server communicates with another server using remote sql.

A file called download.php initiates a mysql connection, checks some
details in the database and then begins streaming bytes to the user with

No matter what I do, I cannot get simultaneous connections to download a
file above 5. For instance if I download a file using a download
manager, a maximum of 5 connections can be made, the rest timeout.

I've setup nginx to accept up to 32 connections, mysql connection is
closed before the file begins to stream so there shouldn't be connection
limit issues there.

According to the logs, Nginx seems to be giving a return code 499 on the
6th request.

Also it's max 5 connections every time, and when I want to download a
second file it won't start because there's a maximum of 5 connections
for my ip.

Does anybody have any idea how I can increase the amount of connections?
Perhaps an idea of what else I can check?

I've also posted my troubles here:


Posted at Nginx Forum:,229216,229216#msg-229216

More information about the nginx mailing list