Skip to content

pgsql_connection:start_link/1 timeout option #49

@benjamin-bergia

Description

@benjamin-bergia

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions