as described in https://serverfault.com/questions/407612/error-2006-mysql-server-has-gone-away
the uwsgi server usually forks its workers from the parent, which already has a connection
open to the mysql database. So the new child typically inherits the same connection.
Should both workers use the same connection at the same time, the server connection throws a
'2006, server has gone away error'.
The flag --lazy creates fresh forks for each child, each creating a new connection.
This prevents the overload and after testing, the '2006' error seems to not be reproduceable.
- uses existing wsgi.py file
- adds wsgi.ini file
- sets socket
- defines application to be run, which it gets from wsgi.py file
- uses http communication to nginx server
- some random number of workers
- updates Dockerfile and docker-entrypoint
- credentials still lost the refresh token after a certain event
- this was now fixed by completely removing any saves past the first one
- https://trello.com/c/iORYLYHl/44-1-check-on-credentials
- Color Coding is now updated
- fixed an incorrect color mapping in the colors.json
- updates some calls to functions to correctly get the natural colors
- the incorrect red -> yellow mapping might have to do with the previous credentials error
- starts uwsgi and flask in virtual environment instead of docker
- sets oauth2 https error to false (OAUTHLIB_INSECURE_TRANSPORT=1)
- this setup works, but
- moving it into docker
- removing the venv
- and allowing https connection internally?
would be better