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 668759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:04:35+00:00 2026-05-14T00:04:35+00:00

All the examples I’ve seen of sock.listen(5) in the python documentation suggest I should

  • 0

All the examples I’ve seen of sock.listen(5) in the python documentation suggest I should set the max backlog number to be 5. This is causing a problem for my app since I’m expecting some very high volume (many concurrent connections). I set it to 200 and haven’t seen any problems on my system, but was wondering how high I can set it before it causes problems..

Anyone know?

Edit: Here’s my accept() loop.

while True:    
    try:
        self.q.put(sock.accept())
    except KeyboardInterrupt:
        break
    except Exception, e:
        self.log("ERR %s" % e)
  • 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-14T00:04:36+00:00Added an answer on May 14, 2026 at 12:04 am

    The doc say this

    socket.listen(backlog) Listen for
    connections made to the socket. The
    backlog argument specifies the maximum
    number of queued connections and
    should be at least 1; the maximum
    value is system-dependent (usually 5).

    Obviously the system value is more than 5 on your system. I don’t see why setting it to a larger number would be a problem. Perhaps some memory is reserved for each queued connection.

    My linux man page has this to say

    If the backlog argument is greater than the value in
    /proc/sys/net/core/somaxconn, then it
    is silently truncated to that value;
    the default value in this
    file is 128. In kernels before 2.4.25, this limit was a hard coded value, SOMAXCONN, with the value 128.

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

Sidebar

Related Questions

Inspired by this question I began wondering why the following examples are all illegal
All the examples I see are for Java SE applications by passing your JAR
All the examples that I can search online use the App.Config mode of specifying
After freezing edge rails, all my controller examples are failing with MissingTemplate errors. e.g.,
Can source code examples be kept in a SQL database while retaining all formatting
Following this example, I can list all elements into a pdf file import pyPdf
Example: find / * Gives me all files and directories, but I want only
For example, here on stack overflow the URL https://stackoverflow.com/questions/tagged/javascript+php will give you all questions
Here's a very simple Prototype example. All it does is, on window load, an
How do I generate all the permutations of a list? For example: permutations([]) []

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.