brianc/node-postgres — Issue #97: Error: This socket is closed.
Author: Ralle
Created: 2012-02-15 12:02:05+00:00
State: open

I am making a system, which monitors server load. Every second, I take fetch the server load.
At the start of the file I connect to the database.
After this, I insert the server load into a table every second. After about 10-20 seconds, I start getting the exception:
Error: This socket is closed.
``node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: This socket is closed.
at Socket._write (net.js:453:28)
at Socket.write (net.js:446:15)
at [object Object]._send (/usr/lib/node_modules/pg/lib/connection.js:102:24)
at [object Object].flush (/usr/lib/node_modules/pg/lib/connection.js:192:8)
at [object Object].getRows (/usr/lib/node_modules/pg/lib/query.js:112:14)
at [object Object].prepare (/usr/lib/node_modules/pg/lib/query.js:150:8)
at [object Object].submit (/usr/lib/node_modules/pg/lib/query.js:97:10)
at [object Object]._pulseQueryQueue (/usr/lib/node_modules/pg/lib/client.js:166:24)
at [object Object].query (/usr/lib/node_modules/pg/lib/client.js:193:8)
at /serverload.js:30:23``