compose

Meteor consuming huge number of Mongo connections

房东的猫 提交于 2019-12-04 05:22:20
We've been having this issue in prod for the past few weeks. Every few days, the number of connections to our compose.io Mongo db spikes to nearly 5000, which is the connection limit. There doesn't appear to be any specific trigger for this behavior. The logs look like this: 2018-08-14T00:02:32.000+00:00 aws-eu-west-1-portal.9.dblayer.com mongodb320: syslogd.25 | 212.233.54.22 65418 [13/Aug/2018:23:57:32.327] ft_mongodb/1: Timeout during SSL handshake 2018-08-14T00:02:32.000+00:00 aws-eu-west-1-portal.9.dblayer.com mongodb320: syslogd.25 | 212.233.54.22 65247 [13/Aug/2018:23:57:32.343] ft

MongoSocketReadException: Prematurely reached end of stream (after a period of inactivity)

一个人想着一个人 提交于 2019-11-28 06:53:32
I get this error on a find call (default Java Driver) after a period of inactivity. I tried to add a manual heartbeat (writing to a capped collection), but it didn't help. I only get the issue while being connected to an instance on compose (i.e. not in a local context). MongoDB version is 3.2.8, latest driver (3.3), using Java 8. Any idea ? I agree with Rhangaun's answer here is my soluction in code of JAVA: public static DB getMongoDB() { MongoClientOptions.Builder builder = new MongoClientOptions.Builder(); //build the connection options builder.maxConnectionIdleTime(60000);//set the max