neumino / rethinkdbdash

An advanced Node.js driver for RethinkDB with a connection pool, support for streams etc.
MIT License
848 stars 109 forks source link

Receiving "The connection was closed by the other party." #384

Open Pupix opened 6 years ago

Pupix commented 6 years ago

During the past month I've started receiving the following error: image

I've got my infrastructure on Google Cloud Platform with RethinkDB running on k8s with a proxy and X replicas in containers created using this.

A bunch of other services, each in their own container use rethinkdash to connect to the proxy and expose data from the DB as needed. So far so good.

During normal daily use there's no problem with the driver, the problem starts happening in the morning (like 2-3 times a week), after I get back into the office and try to access one of the above-mentioned services (during the night there's no activity on those services).

At random (at least seems to be), one of the services will start giving me that error while the others keep working as expected. To fix the problem I just restart the container and the service will connect to the database just fine. This makes me think that's not a problem with the DB itself since other services keep working as intended.

After looking at #300 and #192 I haven't been able to find a fix for this problem.

The only thing that changed on my end before I started getting this error is the number of services that access that DB, if that has anything to do with it. Also I am using v.2.3.31 and pingInterval is 60.

Is there something I can do to fix this or do you need any more information? Also should rethinkdbdash create or use another connection in the pool if the current one has been dropped instead of throwing an error

Cheers, Pupix