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

Zezeng Wang commented on THRIFT-4890:
-------------------------------------

hi ,[~grigala] 

The test scenario I constructed: the server reads a file content greater than 
1M, and returns the read content to the client, but the phenomenon you 
described does not appear. It may be that my test data does not match.

Can you provide the test data conveniently?

> AttributeError: 'Connection' object has no attribute 'message'
> --------------------------------------------------------------
>
>                 Key: THRIFT-4890
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4890
>             Project: Thrift
>          Issue Type: Bug
>          Components: Python - Library
>    Affects Versions: 0.12.0
>         Environment: Ubuntu Linux 18.10 64-bit
>            Reporter: Giorgi Grigalashvili
>            Priority: Major
>              Labels: Connection, Newbie, Python3, Question, non-blocking
>
> As part of my university research I'm using Thrift v0.12.0 to communicate 
> between Python server and Scala client. 
> The data my service is providing to client is lists of thrift 
> objects/structs, those lists contain ~1M items. The issue bellow is produced 
> if I'm sending full lists(more than ~60k items) of data, however if I 
> decrease list items to ~60k everything works fine. 
> {code:java}
> Traceback (most recent call last): 
> File "Server.py", line 40, in <module> 
> server.serve() 
> File "thrift/server/TNonblockingServer.py", line 370, in serve 
> self.handle() 
> File "thrift/server/TNonblockingServer.py", line 350, in handle 
> self.clients[writeable].write() 
> File "thrift/server/TNonblockingServer.py", line 88, in read 
> return func(self, *args, **kwargs) 
> File "thrift/server/TNonblockingServer.py", line 177, in write 
> self._wbuf = self.message[sent:] 
> AttributeError: 'Connection' object has no attribute 'message'
> {code}
> This is my server configuration:
> {code:java}
> ip = '127.0.0.1'
> port = '9000'
> handler = MyHandler()
> processor = MyService.Processor(handler)
> transport = TSocket.TServerSocket(host=ip, port=port)
> tfactory = TBinaryProtocol.TBinaryProtocolFactory()
> pfactory = TBinaryProtocol.TBinaryProtocolFactory()
> server = TNonblockingServer.TNonblockingServer(processor, transport, 
> tfactory, pfactory)
> server.serve()
> {code}
> Now my question is as follows, am I doing something wrong or could it be that 
> it's an issue from Thrift? Any ideas how can I resolve this problem or what I 
> could be doing wrong?
> Thanks in advance.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to