rethinkdb-example-nodejs-chat icon indicating copy to clipboard operation
rethinkdb-example-nodejs-chat copied to clipboard

Addressing potential connection leaks

Open Thesephi opened this issue 10 years ago • 3 comments
trafficstars

Addressing potential connection leak issues caused by connections not being close()'ed properly inside a run handler function. For instance: if an error is thrown or the callback function screws up, the connection object would then be left opened till who-knows-how-long.

I'm not entirely sure if my hypothesis is correct though, so please fix me if I'm wrong. Thank you!

Thesephi avatar Mar 25 '15 20:03 Thesephi

/cc @deontologician

coffeemug avatar Mar 26 '15 04:03 coffeemug

@Thesephi I'll check this out soon, thanks for the PR!

deontologician avatar Mar 26 '15 22:03 deontologician

@deontologician no prob! We were building an app on top of this example, and in the process we noticed this bit. Our rethinkdb log was full of the too many opened files error. This particular issue wasn't the only possible culprit though.

Thesephi avatar Mar 29 '15 02:03 Thesephi