Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9255727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:46:32+00:00 2026-06-18T11:46:32+00:00

I have a Node.js app running in EC2 connecting to MongoDB that is constantly

  • 0

I have a Node.js app running in EC2 connecting to MongoDB that is constantly opening and closing connections. When I tail the log file I see an endless stream of:

Sat Feb   2 23:29:06 [initandlisten] connection accepted from X.X.X.X:54291 #700437
Sat Feb  2 23:29:06 [conn700437] end connection X.X.X.X:54291
Sat Feb  2 23:29:06 [initandlisten] connection accepted from X.X.X.X:42206 #700438
Sat Feb  2 23:29:06 [conn700438] end connection X.X.X.X:42206
Sat Feb  2 23:29:06 [initandlisten] connection accepted from X.X.X.X:34255 #700439
Sat Feb  2 23:29:06 [conn700439] end connection X.X.X.X:34255
Sat Feb  2 23:29:07 [initandlisten] connection accepted from X.X.X.X:49641 #700440
Sat Feb  2 23:29:07 [conn700440] end connection X.X.X.X:49641
Sat Feb  2 23:29:08 [initandlisten] connection accepted from X.X.X.X:54293 #700441

The connection is made once during the app startup process like so:

app.configure('production', function() {
    mongoose.connect('connstring');
})

app.configure(function database() {    
    mongoose.connection.on('error', function (err) {
        console.log(err);
    });
});

I have two questions.

First, is this normal?

Second, why would there not just be a few connections open for the connection pool?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:46:34+00:00Added an answer on June 18, 2026 at 11:46 am

    Looks like they may have added a fix to your issue in the last mongodb driver release here:

    https://github.com/mongodb/node-mongodb-native/blob/master/HISTORY

    1.2.11 2013-01-29
    – Ping strategy now reuses sockets unless they are closed by the server to avoid overhead

    https://npmjs.org/package/mongodb

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Node.js app using Express that stores data in a mongoDB (locally).
I have an Ubuntu server on linode running a node.js/mongo app. I realize I
I am Totally new to Node.js, i have a node app running, but now
I have a small node.js app running at heroku. Everything was fine until today.
I'm running node.js on OSX and have just installed mongodb using command npm install
I have a node.js app that serve static files (html, js, css). Among the
I have running nginx on my server ansel.ms and a node.js app on ansel.ms:46156.
So far I have had a single node.js app. running socket.io. As number of
I have one node app running and I want to try the express framework
I have 2 applications running on the same machine: node.js app running on port

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.