I use uWSGI on ubuntu 18 (18.04.5 LTS). Very recently this stopped working - I'd get this error on startup:
Fatal Python error: Cannot recover from MemoryErrors while normalizing exceptions.
Nothing had changed my side but the server was set to auto-upgrade. Running uwsgi as root worked, but as www-data (which is how I run it normally) failed.
After some trial and error it turned out that the --never-swap
option was causing this - certainly when I removed that, it worked again.
So I can live with removing --never-swap
, but I'd love to know why this happened. Is some new security feature preventing non-root users locking memory pages - that's what the doc says this option does - uWSGI doc here.