Well, your worker_connections is way too high, according to the nginx docs, it should be 1024 or less. That might possibly be causing connection issues.
I can't find anything that might be causing the problem though.
@yariplus Thanks for the help, but I guess it was not the solution. Thanks anyway, im going to try again