Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
CLOSE_WAIT state, bug in gevent?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bo Wang  
View profile  
 More options Jul 2 2012, 3:58 am
From: Bo Wang <wangbo...@gmail.com>
Date: Mon, 2 Jul 2012 00:58:09 -0700 (PDT)
Local: Mon, Jul 2 2012 3:58 am
Subject: CLOSE_WAIT state, bug in gevent?

I'm using the gevent.wsgi.WSGIServer to send requests to the backend( a
server that running redis-server). The "TIME_OUT" of redis's config is set
to 10 seconds, thus the connect would be closed by the redis-server when
the connection is idle for 10s. Inside the wsgiserver, i use redis-py to
genereate one instance.
The problem is that after the connection is closed by the redis-server, the
state of the socket becomes CLOSE_WAIT and the state never changes until
the wsgiserver is killed.

anyone meets similar problem and any help to fix the problem?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Executier Godlike  
View profile  
 More options Jul 2 2012, 9:03 am
From: Executier Godlike <s...@messir.net>
Date: Mon, 2 Jul 2012 15:03:18 +0200
Local: Mon, Jul 2 2012 9:03 am
Subject: Re: [gevent] CLOSE_WAIT state, bug in gevent?
This might help:
http://stackoverflow.com/questions/1913408/tcp-connections-hang-on-cl...

As I understand, you also have to close the socket on your side.
If I'm correct, the CLOSE_WAIT socket is always ready for reading,
but return 0 bytes (see man recv and "return value" section).
So be sure it's a problem in gevent, not in redis.py .


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bo Wang  
View profile  
 More options Jul 5 2012, 5:57 am
From: Bo Wang <wangbo...@gmail.com>
Date: Thu, 5 Jul 2012 02:57:40 -0700 (PDT)
Local: Thurs, Jul 5 2012 5:57 am
Subject: Re: [gevent] CLOSE_WAIT state, bug in gevent?

I have figured out why so many CLOSE_WAIT socket exists. The redis-py
maintains the connection_pool, when the redis-server closes the connection
on its side, redis-py instance would not react immediately. When the socket
whose peer-side closed by redis-server comes to use again, an error will be
raised and redis-py instance would close it and re-establish to the
redis-server. So the CLOSE_WAIT socket could disapper.

Thank you for you help! :)

在 2012年7月2日星期一UTC+8下午9时03分18秒,exe写道:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »