Issue
I have my flask app running on ec2 instance with nginx and gunicorn3. The problem that I have is the following.
When I SSH into the EC2 machine and start the Gunicorn server gunicorn3 app:app
, all routes work fine and I can use then. But, after I close my terminal window, only few routes work and others don't. (Out of 20 routes, only 3-4 work). I am using MongoDB database but that is not the problem because some routes that have MongoDB code work perfectly fine, while others that also have MongoDB code don't.
Any help would be awesome.
Thank You
Solution
The answer is to add --daemon flag when running gunicorn3 app:app
. So the full command is gunicorn3 app:app --daemon
.
Answered By - bd_28 Answer Checked By - Katrina (WPSolving Volunteer)