elixir-ecto / db_connection

Database connection behaviour
http://hexdocs.pm/db_connection/DBConnection.html
309 stars 112 forks source link

Introduce ownership_timeout #24

Closed fishcakez closed 8 years ago

fishcakez commented 8 years ago

Closes #22.

The fix is not quite the same as suggested by #22. We don't want the pool to timeout the connection and disconnect it but the owner process to continue handing out the dead connection with divergent state from the pool. Therefore we pass timeout: :infinity to the pool and do a timeout in the owner process. This will allow people to set ownership_timeout: :infinity to play with sandboxes in dev/shell.

fishcakez commented 8 years ago

@ericmj can you check the hex error on the failed test here? I assume this is a http timeout?

josevalim commented 8 years ago

:heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart:

ericmj commented 8 years ago

@fishcakez It is timing out, probably when loading the ETS table from a file. I will increase the timeout.