[ 
https://issues.apache.org/jira/browse/THRIFT-4600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16793631#comment-16793631
 ] 

Alexander Korkov edited comment on THRIFT-4600 at 3/15/19 2:02 PM:
-------------------------------------------------------------------

I have a problem for python client on windows hosts.

Python client doesn't  reuse sockets.

As Windows has around 16000 ports, and default release timeout equal to 120 
seconds. In case when we send requests with frequency more than 140 request per 
second, after some time all ports became unavailable, and client can’t continue 
to work.

This problem can be solved by removing these lines from the flush function.

But then there is a problem in the *oneway* tests.
 I assume that tests fail because the implementation of *oneway* functions for 
python client is not correct.


was (Author: alekor):
I have a problem for python client on windows hosts.

Python client doesn't  reuse sockets.
 Very frequent requests (about 2-3 hundreds per second) lead to a limit on the 
number of user ports. For OS Windows the limit is about 16 thousand ports with 
TIME_WAIT period 120 seconds and this problem is critical.

This problem can be solved by removing these lines from the flush function.

But then there is a problem in the *oneway* tests.
 I assume that tests fail because the implementation of *oneway* functions for 
python client is not correct.

> Don't close the connection in flush for python THttpClient.py
> -------------------------------------------------------------
>
>                 Key: THRIFT-4600
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4600
>             Project: Thrift
>          Issue Type: Bug
>          Components: Python - Library
>    Affects Versions: 0.11.0
>            Reporter: Finn Isaac Norris Colman
>            Priority: Major
>         Attachments: 1572.patch
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In thrift/lib/py/src/transport/THttpClient.py in the flush method it closes 
> and reopens the connection:
> {noformat}
> if self.isOpen():
>     self.close()
> self.open(){noformat}
>  
> This code is closing the connection on every flush request. The flush request 
> occurs for every message send, which means that keep alive cannot be used. 
> Removing this code from flush means that keep alive can be used as the user 
> now has control over when the connection is closed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to