decentfox/aioh2

priority.priority.TooManyStreamsError

Closed this issue · 3 comments

After using the same connection over and over, I eventually hit this error:

priority.priority.TooManyStreamsError: Refusing to insert 1001 streams into priority tree at once

The reason it seems is that self._priority.remove_Stream(stream_id) is never being called. Maybe and example usage would be https://twistedmatrix.com/trac/attachment/ticket/7460/7460_4.patch

I'll check this, thx for letting me know 😺

So it looks like all that is needed is to plug:

self._priority.remove_stream(event.stream_id)

in both _stream_ended and _stream_reset but that does not seem to play nice with the server side when running unittests assumably because this kills the stream when the server side still need to send data.

Hello !

I am currently working on DoH traffic and using the doh-proxy tool. I'm facing the same problem mentioned by @chantra . Is there any way to patch this in aioh2 or do it manually in the doh-proxy tool?

I've tried deleting streams that have already been sent by using an array containing their stream_id and then trying to delete them if a limit is reached, but this doesn't work.....

if (len(self.streams_id_array) >= 10):
                temp_id = self.streams_id_array[0]
                self.logger.debug("Stream ID: {}".format(temp_id))
                client._streams.pop(temp_id)
                self.streams_id_array.pop(0)

Could you possibly help me solve this problem?

Thanks in advance.