benoitc / gunicorn

gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications.
http://www.gunicorn.org
Other
9.86k stars 1.75k forks source link

[Gevent] socket: read error Connection reset by peer sock.c:635: Connection reset by peer #3284

Open ErazerControl opened 2 months ago

ErazerControl commented 2 months ago

Hi, team. I use gunicorn with gevent to launch django app gunicorn --workers 20 -k gevent myproject.wsgi. But it always report socket: read error Connection reset by peer sock.c:635: Connection reset by peer when I usesiege -c 200 -r 1 http://127.0.0.1:8000/ioTask/ -v to test 200 concurrent requests for my app.

As shown in the test results(Only 65% request successfully) below, it means those requests fail. How do I fix it?

BTW, It still not work when I increase --backlog...

Env:

OS: MacOS 14
Chip: M3 pro
Python: 3.12.4
Gunicorn: 24.2.1
gevent: 24.2.1
image