NGINX + uWSGI Connection Reset by Peer

make sure to consume your post data in your application

for example if you have a Django/python application

def my_view(request):

    # ensure to read the post data, even if you don't need it
    # without this you get a: failed (104: Connection reset by peer)
    data = request.DATA

    return HttpResponse("Hello World")

Some details: https://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html

Leave a Comment