Django application 504 error after saving model
I have a Django website running Django 1.8 with Python 3.4 and hosted on AWS via ElasticBeanstalk. Recently, I've been having some issues with the Django admin area and 504 errors. The problem is very difficult to reproduce, it seems to happen randomly. When I save an instance of a model, sometimes the website hangs and returns a 504 error (and doesn't save). Afterwhich elasticbeanstalk restarts the server and everything works fine again. In my logs I get the following errors. End of script output before headers: wsgi.py extern "Python": function Cryptography_rand_bytes() called, but @ffi.def