Issue with timeout Postgresql database and Render Service

I’m currently trying to use a Flask Render Web Service with a Render postgresql database to store users and more. The database is currently internally connected to the web service. When I deploy the web service, it works fine for about 0.5-1.5 hours, but then the database disconnects and never reconnects, and I am not able to do anything with it.
The database logs display this as well:

I’m not sure if this is something on my end or a problem with render. When I host the app on a local server for testing, it works fine for hours, but it has this problem on render. Let me know if there’s more information needed.

Another problem I’ve been dealing with is not being able to login to the web service on multiple computers. Only the first login works, and the rest of them don’t. I’m not sure if these two problems are related, but they might be.

Thanks in advance.

Never mind I fixed the error, which was something wrong with my code. :grin: