-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Vertx 4.2.6 WebsocketEndpoint InflightRequest Not Reducing #5415
Comments
Thank you for the detailed explanation of the issue. I’ve tried to analyze the behavior and reviewed the provided code. Below is my understanding of the problem and proposed steps to resolve it. The root cause lies in the inflightConnections counter. When a connection request fails, inflightConnections is not decremented. This results in: Inflated inflightConnections value, preventing new requests from being processed. |
we can use this code public void handle(AsyncResult ar) {
} |
@AnjaliTajane - This is Vertx code. Does this mean there is a bug in this class? If so, i wonder why its not a reported issue already as i skimmed at all issues raised on this repo for last 4 years? |
Thank you for pointing that out. Yes, this code is part of Vert.x, and from my point of view, it seems like the inflightConnections count might not be decremented in certain failure scenarios, leading to all further connection requests being queued indefinitely. Regarding why this hasn’t been reported yet, there could be several reasons: Usage Patterns: This issue might only surface in edge cases or specific usage scenarios that aren’t common among most users of this library. Would you like me to draft a clear and concise bug report for submission? |
Sure, that would be helpful. Are you not one of the maintainers? |
Thank you for asking! No, I’m not one of the maintainers, but I’ve been actively exploring and working with the Vert.x framework. This issue caught my attention while troubleshooting a specific use case in my project, so I wanted to analyze and understand it better. I’m happy to assist in drafting a detailed bug report or providing a reproduction scenario to ensure the maintainers have the necessary context to investigate further. Let me know if that sounds good, and I’ll prepare it! |
@AnjaliTajane I'll be happy to collaborate, let me know if i can provide anymore details in filing a better bug report. Do you know how long it takes for maintainers to respond? |
No i dont have any idea about when would the maintainers respond @gonit |
can you provide a reproducer for this ? |
yes sir sure @vietj |
WebSocket Issue reproducer public class WebSocketIssueReproducer {
} I hope this code helps to solve the problem |
thanks @AnjaliTajane I'll have a look |
@vietj Thanks for picking this. Does this issue looks to be a bug? |
I haven't had time to investigate yet |
Please Investigate sir i hope it helps for better enhancement @vietj |
Version
Which version(s) did you encounter this bug ?
4.2.6
Context
I encountered a state in my Vertx Java application where the websocket connection requests are not reaching to the server (confirmed by TCPDump). On digging deeper, i noticed that each Vertx context has a HttpClient. Each HttpClient has 2 ConnectionManager one for Http and other for Websocket. WebsocketConnectionManager contains Endpoint map storing a WebsocketEndpoint object against a key - server. The class WebSocketEndpoint maintains 2 important properties - Waiters queue and inflightRequest. For each connection request, if inflightRequest count is less than maxPool, then the request is appended to Waiter queue otherwise inflightRequest is incremented. The inflightRequest count is only decremented after the connection is made(see second code block). Once number of inflight request crosses for a server crosses maxPool than all further requests are queued. We noticed when the maxPool number of connection request fails, the inflightRequest count is not decremented causing all further request to land onto Waiter queue. If this queue is unbounded its a never ending state. All these details are confirmed with heapdump.
Do you have a reproducer?
Sorry, this code is part of my repository for which i have not created a reproducer yet. I would like to take guidance on current problem.
Extra
The text was updated successfully, but these errors were encountered: