Flask API going offline

I've some Rest API endpoints on Flask. Once I reload the site, everything works but after a while it returns errors. It would stop working unless I reload the website. Please Help

that sounds like you have some sort of resource leak... What error codes does it return? Are there any clues in your error log?