Skip to content
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

Connections are hanging up #33672

Closed
ugurberkecan opened this issue Oct 9, 2024 · 5 comments
Closed

Connections are hanging up #33672

ugurberkecan opened this issue Oct 9, 2024 · 5 comments
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket)

Comments

@ugurberkecan
Copy link

ugurberkecan commented Oct 9, 2024

#32249 (comment)

The solution is here seems like haven't been fixed yet.

Hi, even though we have a heartbeat, some connections don't close when we have too many subscriptions at the same time. What should I do?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 9, 2024
@ugurberkecan ugurberkecan changed the title Hi, even though we have a heartbeat, some connections don't close when we have too many subscriptions at the same time. What should I do? Connections are hanging up Oct 9, 2024
@bclozel
Copy link
Member

bclozel commented Oct 9, 2024

I'm sorry but this is not enough for us to help you. Can you elaborate more? Which web framework and server are you using? What kind of connections are we talking about? Are you seeing errors when the server write heart beats? How are those hearts beats being implemented? Are connections closed as described in the other issue after some time of inactivity?

@bclozel bclozel added status: waiting-for-feedback We need additional information before we can continue in: web Issues in web modules (web, webmvc, webflux, websocket) labels Oct 9, 2024
@ugurberkecan
Copy link
Author

ugurberkecan commented Oct 9, 2024

I’m using Tomcat integrated with the Spring framework, and i have a Flux SSE (Server-Sent Events) setup.

I’m sending around 1000 subscription requests, and they all successfully connect. There's no timeout set for the Flux.

When I terminate the connections from the client side (via the terminal), I can see that the unsubscribe method is being called.

Essentially, I’m using Flux like this:

return Flux.merge(
bookService.createBookStream(ip),
createHeartbeatStream()
);

Hearbeat :
Flux.interval(Duration.ofSeconds(2))
.map(ping -> ServerSentEvent.<List>builder()
.event("ping")
.build());

I don't see any errors, but the number of connections keeps increasing. Even though the unsubscribe method is called for each of them, the connections still seem to hang. Additionally, I’ve noticed that the HTTP connections remain alive for up to two days.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Oct 9, 2024
@bclozel
Copy link
Member

bclozel commented Oct 9, 2024

The setup seems minimal then. Can you reproduce this behavior in a sample application and share it with us here? You can create an app on start.spring.io and attach it here, or share a repo on github. Thanks!

@bclozel bclozel added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Oct 9, 2024
@spring-projects-issues
Copy link
Collaborator

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Oct 16, 2024
@spring-projects-issues
Copy link
Collaborator

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@spring-projects-issues spring-projects-issues closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2024
@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged or decided on labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket)
Projects
None yet
Development

No branches or pull requests

3 participants