-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RxNetty hangs after sending more than 45 Kbytes of data without flushing #571
Comments
The problem here is that the source does not complete, due to lack of Good or bad, RxNetty requires explicit flushing and does not do anything related to flushing automagically. I initiated a feature in netty to support |
Ok thanks for your feedback. |
@NiteshKant Just a last question, should I expect multiple threads access on a specific flush selector instance created for each write call? I would like to know if this simple implementation is ok, or if I should care about concurrent access to |
There would not be concurrent access, but you will have to take care of visibility as it may be invoked by different threads at different times. |
Could you explain what you mean by "you will have to take care of visibility"? |
Flush selector can be invoked by multiple threads but not concurrently. So, if you have shared state, modifications to this state may not be visible across invocations of the flush selector. |
Ok thanks |
As demonstrated in this sample repro project, RxNetty HTTP server seems to block without sending any data to the client when writing more than approximatively 45 Kbytes, for example when using
ResponseContentWriter#writeString(Observable<String>)
. Maybe the flush triggered by complete is never reached because Netty send buffer is full.Shouldn't RxNetty handle this case? I would assume RxNetty to auto-flush the data before reaching Netty send buffer limit. If these is expected, could you please explain how can I deal with that use case?
This issue has been discovered as part of Spring Web Reactive benchmarks, see https://jira.spring.io/browse/SPR-14943 for more details.
Thanks in advance for your feedback.
The text was updated successfully, but these errors were encountered: