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_extern() was not called in the current subinterpreter. Returning 0.
These two errors are repeated multiple times. Can anyone help me figure out how I can debug this?
Thank you!
It is probably due to this bug https://github.com/pyca/cryptography/issues/2299
How to fix discussed here https://github.com/pyca/cryptography/issues/2473
Which seems to say uninstall python Cryptography library and then pip install version 1.1 of it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With