handle connection timeouts from node-pg, fixes #1207