Author manu
Recipients Jim.Jewett, manu, r.david.murray
Date 2016-12-23.03:45:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1482464728.85.0.385372445234.issue28968@psf.upfronthosting.co.za>
In-reply-to
Content
Below is the information sent to python-dev group....

=======================================================================

[ Issue ]
I have used xml rpc library with transport as http. My client and server are running on same host.

Some xml rpc requests fail with connection reset by peer error number. I have used xmlrpclib.ServerProxy() to call remote method on xml rpc server running on an ephemeral port.

This issue has happen many times.

log snippet,

  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1237, in request
    errcode, errmsg, headers = h.getreply()
  File "/usr/lib64/python2.6/httplib.py", line 1064, in getreply
    response = self._conn.getresponse()
  File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse
    response.begin()
  File "/usr/lib64/python2.6/httplib.py", line 391, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python2.6/httplib.py", line 349, in _read_status
    line = self.fp.readline()
  File "/usr/lib64/python2.6/socket.py", line 433, in readline
    data = recv(1)
error: [Errno 104] Connection reset by peer

[ Test Environment ]
RHEL 6 with linux kernel 2.6.32-504.16.2.el6.
Python 2.6.6
glibc-2.12-1.149.7


[ Possible Reasons for it ]

1) The machine is connected to the network, and the network is not responsive. 
2) The other side of the connection is not running normally. 
3) There are not enough system resources available. Free up system resources if they are running low. 

Possibility for 1 and 2 are not applicable as it is loop back communication(Client and Server running on same machine).
For Possibility 3, I have already checked system resource and there are enough resources(80% RAM used, 20% cpu usage, around 10 GB RAM free).

I checked for other reasons and i found that this issue may be related with GIL,
Please refer this link,
http://stackoverflow.com/questions/383738/104-connection-reset-by-peer-socket-error-or-when-does-closing-a-socket-resu 

1> Can you please let me know, is it really a issue realted with GIL?
2> If yes, How to resolve this issue?
3> If no, what other reason may exists for such failure. [Note: Those rpc requests fail which return python's dictionary data to client]


========================================================================
History
Date User Action Args
2016-12-23 03:45:28manusetrecipients: + manu, r.david.murray, Jim.Jewett
2016-12-23 03:45:28manusetmessageid: <1482464728.85.0.385372445234.issue28968@psf.upfronthosting.co.za>
2016-12-23 03:45:28manulinkissue28968 messages
2016-12-23 03:45:26manucreate