I have a web app that runs on flask and a small amount of JQuery.
The app uses an API to gather data and returns a graph to users. For smallish requests, everything works. However, I'd like to enable a user to ask for a large collection of data. When the user asks for say 100 data points, the program needs to run for as along as 10 minutes.
Before the program is finished, a 502 error is thrown.
Additional details: I've setup logging and can see the program continuing to run and collect data after the 502. I'm also using ajax to call the offending long running flask function with an alert to trigger on 502, which is how I know the error code.
Question: Is there a solution to this problem ?
TIA