Closed
Description
Hi brianc,
this is my first Bug report, so please don't blame me for bad style:)
I have an issue with loosing connections. This happens after upgrading to node v0.10.1. I used v.8x? before and it worked. I am developing with Windows 8.
Maybe this happens because the Garbage Collector was modified in the new release?
I wrote a simple mocha test that shows the problem.
var pg = require('pg');
describe('pg', function(){
this.timeout(65000);
describe('connection', function() {
it("should throw no error for 1 min", function(testDone) {
pg.on("error", function(e){
//"Error: read ECONNRESET" is thrown for me after 30sec
testDone(e)
});
pg.connect("tcp://postgres:1234@localhost/postgres", function(err, client, done){
client.query("select 'something'", function(err, result){
done();
if (err) return testDone (err);
setTimeout(function(){
testDone();
}, 60000);
});
})
});
});
})
Debugging this lead me to the assumption, that it is caused by the garbage collector, that is trying to destroy the tcp socket used by the database, but maybe I am completly wrong with this.
Metadata
Metadata
Assignees
Labels
No labels