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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:46:25+00:00 2026-06-14T08:46:25+00:00

I am doing some stress test to a simple HTTP redirect server in Python

  • 0

I am doing some stress test to a simple HTTP redirect server in Python scripts. The script is set up with epoll (edge trigger mode) with non-blocking sockets. But I observed something that I don’t quite understand,

1) epoll can get both ECONNREFUSED and ETIMEOUT errno while the connect() is in process. Don’t they both indicates the remote server can’t accept the connection? How are they different, how does a client tell the difference?

2) sometimes when EPOLLIN is notified by epoll, socket.recv() returns empty string without any exception thrown (or errno in C), I can keep reading the socket without getting any exception or error, it just always returns empty string. Why is that?

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-14T08:46:26+00:00Added an answer on June 14, 2026 at 8:46 am
    1. ECONNREFUSED signals that the connection was refused by the server, while ETIMEOUT signals that the attempt to connect has timed out, i.e. that no indication (positive or negative) about the connection attempt was received from the peer.

    2. socket.recv() returning an empty string without error is simply the EOF condition, corresponding to an empty read in C. This happens when the other side closes the connection, or shuts it down for writing. It is normal that EPOLLIN is notified when EOF occurs, because you want to know about the EOF (and because you can safely recv from the socket without it hanging).

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

Sidebar

Related Questions

Doing some jquery animation. I have certain divs set up with an attribute of
While doing some random experimentation with a factorial program in C, Python and Scheme.
Doing some 3D stuff in wpf- want to use a simpler test to see
im doing some test with the flicker API and i got a wierd problem
Doing some archiving/deleting of some uncommonly used databases on an Oracle server. Has anyone
I want to stress test my service endpoint, making http POST requests. I want
I am doing some stress testing on FIX message parsing on a GPU. What
Doing some exercises with simple file encryption/decryption and am currently just reading in a
I hosted my application, and doing some stress tests, I noticed that when shooting
I'm creating a test which will perform some stress testing of the app which

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.