Repl become non-responsive with 502 bad gatewayd despite Always On

Problem description:
1.my flask app becomes non-responsive after several hours, every day, thought the repl did not stop. I have to manually click on Stop and Run again.
2. it will give a 502 bad gateway for client requests.
3. It happens every several hours without throwing any error.
4. its especially true when I closed the Replit web in browser for extended hours.
5. Always On is turned on.
6. It would be in 502 state for a extended period until I manually Stop and Run the app again.

Expected behavior:

  1. My repl should not throw 502 error or become non-responsive.
  2. if Replit still shut down Always On repls, it should shut down and restart it, but my case is it seems did not shut down either, I saw the Stop button despite 502 error, means it is still running?

Actual behavior:

Steps to reproduce:
close the browser, and do nothing, wait for several hours, it will throw 502 error.

Bug appears at this link:

Browser/OS/Device: