Ecto timeout problem in Phoenix

183 views
Skip to first unread message

Nokan Emiro

unread,
Mar 18, 2016, 11:33:02 AM3/18/16
to elixir-lang-talk
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.

José Valim

unread,
Mar 18, 2016, 11:59:25 AM3/18/16
to elixir-l...@googlegroups.com
Hi Nokan,

Can you please open up an issue in mariaex issues tracker?  Afaik mariaex should reconnect if the connection is stale: github.com/xerions/mariaex

Thank you for the report and have a good weekend!



José Valim
Skype: jv.ptec
Founder and Director of R&D

--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/8c872775-93a5-43fb-83ba-8b1b15ebc838%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages