Gunicorn, Django, Nginix & Postgres - Connection reset by peer when post request is large

February 18, 2018 424 views
Applications Ubuntu 16.04

Hi there,

I have a django application with postgres database (postgresql_psycopg2 specifically), using Gunicorn & Nginix. Essentially I followed this guide.

Part of the application is a form with a CharField that users put text input into. This is then processed and stored in the db. When the amount of text input is relatively small the application works as expected, however when the input text input becomes very large the application fails and I get a 'Site can't be reached. The connection was reset error'. It seems like somewhere between the database, gunicorn or Nginix the amount of data being processed is causing an issue somewhere. I haven't got much experience at logging etc. so am not sure where to look for what the issue is and how to fix it. It shouldn't be an issue with the application logic, as it worked fine in development.

Any suggestions would be very welcome.

Thanks!

Jack

Be the first one to answer this question.