Hello folks,
Apologies in advance...I'm a newbie uWSGI user, and I have only started the
learning curve of how uWSGI works, but I am curious about an error I see when I
try to performance test my app by increasing the # of REST callers per second
to my uWSGI app over time.
As the # of users/second increases, response times increase as I would expect,
but at some point requests fail with this information showing up in the logs:
uwsgi_response_write_headers_do(): Connection reset by peer [core/writer.c line
182]
2013-06-05 15:24:18 CRITICAL [barbican] write error
IOError: write error
I was expecting that at some point I would just start to get timeout errors
rather than app failures. I have made no attempts to tune my app for
performance (so still using one uWSGI worker for example), but I'm curious what
might cause this failure mode to occur.
I believe the failure line applies to this snippet of code:
for (;;) {
int ret = wsgi_req->socket->proto_write_headers(wsgi_req,
wsgi_req->headers->buf, wsgi_req->headers->pos);
if (ret < 0) {
if (!uwsgi.ignore_write_errors) {
uwsgi_error("uwsgi_response_write_headers_do()");
}
wsgi_req->write_errors++;
return -1;
}
There is a statement I note in the boot logs of uWSGI:
your server socket listen backlog is limited to 100 connections
So could the issue be that I'm hitting this connection limit? If so, then to
mitigate this issue I would need to (1) speed up my request processing (general
performance tuning/tweaking/threading), and/or (2) spin up new server(s) to
handle the load behind a load balancer. I've read that simply increasing the
max connection limit is foolish as your system is probably already saturated.
If this connection limit is not the issue, do you know what typically leads to
this issue?
Any advice would be much appreciated.
Thanks,
John
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi