"110: Connection timed out" and "104: Connection reset by peer" error in nginx error log

Hi All,

When i run my Jmeter load test with 2000 users ,I got below 2 error in
nginx
error log frequently.

/opt/nginx/logs/error.log=>

2014/11/06 11:05:40 [error] 3430#0: *18263 connect() failed (110:
Connection
timed out) while connecting to upstream, client: 54.176.137.82, server:
proteus.io, request: “POST /v1/!syncData/1415271933826/sync HTTP/1.1”,
upstream:
http://127.0.0.1:2480/function/pharos/syncData/1415271933826/sync”,
host:
perf.proteus.io

2014/11/06 11:05:46 [error] 3430#0: *18266 recv() failed (104:
Connection
reset by peer) while reading response header from upstream, client:
54.177.66.244, server: proteus.io, request: “POST
/v1/!syncData/1415271934189/sync HTTP/1.1”, upstream:
http://127.0.0.1:2480/function/pharos/syncData/1415271934189/sync”,
host:
perf.proteus.io

We are using nginx as web server and orientdb as database.
So please suggest solution to resolve this issues.

Posted at Nginx Forum:

Short answer:
Not nginx-related (you are on the nginx mailing list).

Long answer:
As your log clearly indicates, your upstream sometimes fails either by
resetting connections improperly or even by not accepting them at all.
Everything indicates your backend does not sustain the load.

The most troublesome part is IMHO the fact it kills active connections
improperly. Try to get information on what happens on the backend
machine.
See if something like shortage of file descriptors or anything leading
to
connection disruption.

One thing you could do to alleviate the load on the backend with the
current setup would be to add cache where you proxy/redirect requests to
your backend (See *_cache directives, depending on the module you are
using).

B. R.