Re: [Twisted-Python] Thread Cancelled

2021-01-24 Thread Robert DiFalco
Well, I've dealt with this issue with other languages. Not sure how to deal with it in Klein/Twisted. This operation is idempotent so I suppose what I'd like to happen is have the whole chain of deferred's succeed but then just not be able to write the response to the socket -- but not interrupt th

Re: [Twisted-Python] Thread Cancelled

2021-01-24 Thread Glyph
If you're dealing with lots of clients on the public internet, sometimes this is just gonna happen, for a variety of reasons; it's normal. We would welcome better error reporting for this scenario so it doesn't require the kind of debugging you just did :-). -g > On Jan 24, 2021, at 2:58 PM,

Re: [Twisted-Python] Thread Cancelled

2021-01-24 Thread Robert DiFalco
That makes sense, thank you. A timeout seems unlikely but maybe the client is closing the connection due to a network issue. This is an extremely rare occurrence. On Sun, Jan 24, 2021 at 2:41 PM Glyph wrote: > While a socket is open and receiving data, recv() will either give you a > non-zero nu

Re: [Twisted-Python] Thread Cancelled

2021-01-24 Thread Glyph
While a socket is open and receiving data, recv() will either give you a non-zero number of bytes if bytes are ready, or an EWOULDBLOCK (AKA EAGAIN) if no bytes are ready. A result of zero bytes (the empty string) means "end of file" - the other end has closed the socket. So what's happening h

Re: [Twisted-Python] Questions about Project Leadership committee

2021-01-24 Thread Glyph
> On Jan 24, 2021, at 5:48 AM, Adi Roiban wrote: > > It's just a personal frustration that we need to make extra effort, when we > don't have much time and energy for code reviews. > I feel this every single day :) Thanks, -g___ Twisted-Python ma

Re: [Twisted-Python] Thread Cancelled

2021-01-24 Thread Robert DiFalco
You're absolutely right, I meant "cancel the deferred". I don't grok server sockets very well so maybe someone can help. But apparently, klein does a .doRead from our server socket (getting the request from the client?). This returns a "why" of "connection done" so that closes the connection before

Re: [Twisted-Python] Thread Cancelled

2021-01-24 Thread Colin Dunklau
On Sun, Jan 24, 2021 at 11:45 AM Robert DiFalco wrote: > Hi, I apologize this question is a little vague. I'm looking for pointers. > I have a klein route that makes an underlying deferToThread call with a > simple single thread (an IO based sync call I can't change, a boto3 sqs > write). The thr

[Twisted-Python] Thread Cancelled

2021-01-24 Thread Robert DiFalco
Hi, I apologize this question is a little vague. I'm looking for pointers. I have a klein route that makes an underlying deferToThread call with a simple single thread (an IO based sync call I can't change, a boto3 sqs write). The thread pool is simple, just a couple of threads, nothing fancy. VER

Re: [Twisted-Python] Questions about Project Leadership committee

2021-01-24 Thread Adi Roiban
On Sun, 24 Jan 2021 at 09:57, Glyph wrote: > > On Jan 24, 2021, at 1:24 AM, Adi Roiban wrote: > > Hi, > > On Sun, 24 Jan 2021 at 04:29, Glyph wrote: > >> >> On January 23, 2021 at 6:10:04 PM, Craig Rodrigues ( >> rodr...@crodrigues.org) wrote: >> >>> >>> >>> On Sat, Jan 23, 2021 at 4:54 PM Glyp

Re: [Twisted-Python] Questions about Project Leadership committee

2021-01-24 Thread Glyph
> On Jan 24, 2021, at 1:24 AM, Adi Roiban wrote: > > Hi, > > On Sun, 24 Jan 2021 at 04:29, Glyph > wrote: > > On January 23, 2021 at 6:10:04 PM, Craig Rodrigues (rodr...@crodrigues.org > ) wrote: > >> >> >> On Sat, Jan 23, 202

Re: [Twisted-Python] Questions about Project Leadership committee

2021-01-24 Thread Adi Roiban
Hi, On Sun, 24 Jan 2021 at 04:29, Glyph wrote: > > On January 23, 2021 at 6:10:04 PM, Craig Rodrigues (rodr...@crodrigues.org) > wrote: > >> >> >> On Sat, Jan 23, 2021 at 4:54 PM Glyph wrote: >> >>> At the time the committee was created, I don’t remember if this was >>> public, so I don’t feel