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

  • Home
  • SEARCH
  • 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 7533135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:39:13+00:00 2026-05-30T05:39:13+00:00

we are trying to make an api server for our project. we are using

  • 0

we are trying to make an api server for our project.

we are using mongodb with pymongo on debian boxes. everyhting is up to
date.

but we are having a really weird connection problem. there is
generally more than 15k-32k connections to mongodb port when i check
with

root@webserver1:/# netstat -na | grep mongo_db_ip | wc -l

i got 15363

connections are at TIME_WAIT state…

but when i check mongo, i only see 5-6 connections at the moment…

we wrote a mongodb class, that creates an instance and makes
connection. we tried call conn.disconnect() or conn.end_request()
everytime query end but it is not stoped that high connection
number…

is there anybody can tell what should be my mistake, or is there any
written python class for mongodb to examine how others make such as
stuff…

thanks for help, and information…

  • 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-05-30T05:39:15+00:00Added an answer on May 30, 2026 at 5:39 am

    TIME_WAIT is not an open connection. It’s an Operating System state for a socket so that it can make sure all data has come through. AFAIK, the default length for this on Linux is a minute. Have a look at http://antmeetspenguin.blogspot.com/2008/10/timewait-in-netstat.html, it has a good explanation. You can tell the kernel to reuse the TIME_WAIT sockets though:

    echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout

    reduces it to 30 seconds.

    However, you should be checking why you are making so many connections. You’re saying you’re using the Debian packages for mongod and pymongo, and they tend to be out of date. You really want to be running mongod 2.0.2 and pymongo 2.1.1.

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

Sidebar

Related Questions

I'm trying to make an API for my rails application using JSON responses to
I'm trying to make my first web service client for the eBay API using
I'm trying to make a RESTful api call from the android emulator (using android
I'm trying to call Google Places API 1 using jQuery but it seems to
I'm trying to make use of a java api for google voice (available here:
We are trying to create a RESTful API that will be hosted on server
I am trying to make a POST http.request in Node to an API where
I'm trying to access a 3rd party api over http using jquery .ajax (or
I'm trying to send-retrive message from server by SOAP... but soapConnection.call( soapMessage, endpoint )
I am trying to authenticate to a server's secure URL using java.net.urlconnection - based

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.