So, I've recently deployed my first Flask app with gunicorn. During deployment, I encountered the most peculiar issue. I had created a systemd unit file (the following is the working, functional example):

Description=Gunicorn instance for newscrape

ExecStart=/var/www/newscrape/newscrapeenv/bin/gunicorn --bind run:app


Now, this works fine, but it is not what I originally wanted. My ExecStart line originally read: ExecStart=/var/www/newscrape/newscrapeenv/bin/gunicorn --workers 4 --bind run:app

When I tried enabling and starting the unit file, I began to experience a crash loop for both my created service and the MySQL service. An endless waltz of both services horrendously going down in flames ensued.

Running the command: ss -tln showed neither service listening or one of two running at any given time.

My question is this: Why does gunicorn with workers crash the MySQL server but gunicorn without workers does not?


If the documentation is correct on http://docs.gunicorn.org/en/stable/run.html, it seems as if only the equal signs are missing, for example --workers=4

  • Behavior is the same, with or without the equals sign. – m-flak Aug 14 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.