Skip to content

Timeout causing process crash #585

@solomon23

Description

@solomon23

I'm seeing an issue where I have a server that makes a call to the db every 3 seconds. If if it can't connect to the DB the process crashes even though the error is handled.

I can repro this by starting my server and then pulling the network cable. What i'm seeing is the error returned from client.query and I'm able to call done(). But then the process crashes with the same error:

[2014-05-06 21:49:52.065] [TRACE] - No records to process. Sleeping.
[2014-05-06 21:50:24.035] [ERROR] - Error getting records to process { [Error: read ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'read' }
Error: read ETIMEDOUT
at errnoException (net.js:901:11)
at TCP.onread (net.js:556:19)

error running query { [Error: read ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'read' }

events.js:72
throw er; // Unhandled 'error' event
^
Error: read ETIMEDOUT
at errnoException (net.js:901:11)
at TCP.onread (net.js:556:19)

I tried this using the sample code directly and the latest version of the PG.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions