top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Error in MongoDB "An existing connection forcibly closed by remote host"

0 votes

I got the error when I was try to import the .csv file in collection, file size was about 4 gb. The error was: "An existing connection forcibly closed by remote host."

What is the probable reason and how can I increase the connection time in MongoDb?

posted Jun 3, 2016 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

Query description: I have a collection name student_db and added a document in a collection with entries (name: "alok, age : 31 and profession: "xyz"). After inserting the document into student_db database, I want to add another (key:value ) pair i.e. salary: 50000.

Can someone help me out to resolve this problem ?

+1 vote

I have a DB with several (quite big) collections, on Mongo 3.2.5 and WiredTiger with snappy compression on. I would like to change the compression setting on one small collection I have to test it uncompressed. Is there a possibility to do that on a secondary without having to resync the whole DB?

+2 votes

suppose, I have an existing capped collection with the following syntax.

db.createCollection("mycappedCollection",{capped: true, size: 2, max:2})

Now, what i want is to modify the above collection and add the autoIndexId option.

db.createCollection("mycappedCollection",{capped: true, autoIndexId: true, size: 2, max:2})

How can I modify the existing mycappedCollection?

+3 votes

while i am connecting from my windows machine to mongoDB server running on remote windows machine.
I am getting the following error.

MongoDB shell version: 3.0.4
connecting to:
2015-06-20T15:16:52.584+0530 W NETWORK Failed to connect to
after 5000 milliseconds, giving up.
2015-06-20T15:16:52.589+0530 E QUERY Error: couldn't connect to server 192.16
8.0.103:27017 (, connection attempt failed
at connect (src/mongo/shell/mongo.js:181:14)
at (connect):1:6 at src/mongo/shell/mongo.js:181
exception: connect failed

+1 vote

We are using php, mongodb v 2.6.10, we have not set connection pool. We want to set connection pool at server level.
Presently we are creating a new connections every time, when application talk to database. When our no of connection reach to 400, our db performance impact so badly, and query time increase up to 4 times.