pgsql icon indicating copy to clipboard operation
pgsql copied to clipboard

pgsql_connection:start_link/1 timeout option

Open benjamin-bergia opened this issue 7 years ago • 0 comments

I recently had some issues when starting a large number of connections quickly. I am not sure if I reached the maximum number of connection during a spike on my server but the pgsql_connection_sup gets stuck from time to time and its mailbox fill-up until I a manually restart the node or kill the process.

The supervisor seems to get stuck in here https://github.com/semiocast/pgsql/blob/master/src/pgsql_connection.erl#L453. Adding a short timeout like {timeout, 500} seems to do solve the problem.

It would be nice to have this setting as an option. I can try to work on a PR if you are interested.

benjamin-bergia avatar Jul 04 '18 07:07 benjamin-bergia