Hi,
I made a Phoenix app that is now running in production mode in my workplace. (It's just for internal use...) I realized that after leaving the app alone for a whole night, the first request fails with an internal server error. The reason is that the database connection times out overnight. After that failing request, the subsequent requests are fine, because the db connection recovers. (I use Mariaex because of the company culture.)
My question is, if this is the expected behavior? I understand that OTP/supervision handles this event and the whole app is healthy, and it's only that single request that fails. But I don't think it is correct to let that request fail in this case. It should be served after recovering the db connection.
Am I right if I say that this is a bug? Or can I do something about it within the boundaries of the Phoenix app? Or maybe it has something to do with the mysql driver and Postgres doesn't have this issue?
U.