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

James E. King III commented on THRIFT-4890:
-------------------------------------------

Sounds like there's a buffer or position management error in the non-blocking 
server when dealing with large data sets.

> 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 - Compiler
>    Affects Versions: 0.12.0
>         Environment: Ubuntu Linux 18.10 64-bit
>            Reporter: Giorgi Grigalashvili
>            Priority: Major
>              Labels: Connection, Newbie, Python3, Question
>
> 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
(v7.6.3#76005)

Reply via email to