I have a flask application which is running using Gunicorn.
This flask application have an API which takes two hours to complete.
If the same API is called twice after a 30 minutes gap between two , then the process handling the first API call is getting restarted after the second API call.
Example: Initial process starts with API_1 After 30 mins API_1 is called again , then the process handling previous API_1 call is getting restarted.
Command used to start the Gunicorn server:
nohup gunicorn --bind 0.0.0.0:5000 --workers=8 run:app --timeout 7200 --preload> output.log&
No of core : 8
I am not facing any issue while running flask in development mode.
Any idea why its behaving like this ?