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

Fix issue, SSE connection will terminate after 30 seconds (DEFAULT). #21

Merged

Conversation

zekozhang
Copy link

Motivation and Context

Base on: spring-projects/spring-ai#2267

The SSE connection will automatically disconnect 30 seconds after being established.

2025-02-24 18:13:39.403 [http-nio-8822-exec-2] INFO  i.m.server.McpAsyncServer - Client initialize request - Protocol: 2024-11-05, Capabilities: ClientCapabilities[experimental=null, roots=null, sampling=null], Info: Implementation[name=Spring AI MCP Client, version=1.0.0]
2025-02-24 18:14:09.564 [http-nio-8822-exec-5] WARN  o.s.w.s.m.s.DefaultHandlerExceptionResolver - Ignoring exception, response committed already: org.springframework.web.context.request.async.AsyncRequestTimeoutException
2025-02-24 18:14:09.564 [http-nio-8822-exec-5] WARN  o.s.w.s.m.s.DefaultHandlerExceptionResolver - Resolved [org.springframework.web.context.request.async.AsyncRequestTimeoutException]

How Has This Been Tested?

Step1:

Create a MCP server with spring-ai-mcp-server-webmvc-spring-boot-starter like spring-projects/spring-ai#2267

Step2:

Connect mcp server with any MCP client.

Step3:

Wait for 30 seconds, get logs

2025-02-24 18:13:39.403 [http-nio-8822-exec-2] INFO  i.m.server.McpAsyncServer - Client initialize request - Protocol: 2024-11-05, Capabilities: ClientCapabilities[experimental=null, roots=null, sampling=null], Info: Implementation[name=Spring AI MCP Client, version=1.0.0]
2025-02-24 18:14:09.564 [http-nio-8822-exec-5] WARN  o.s.w.s.m.s.DefaultHandlerExceptionResolver - Ignoring exception, response committed already: org.springframework.web.context.request.async.AsyncRequestTimeoutException
2025-02-24 18:14:09.564 [http-nio-8822-exec-5] WARN  o.s.w.s.m.s.DefaultHandlerExceptionResolver - Resolved [org.springframework.web.context.request.async.AsyncRequestTimeoutException]

Breaking Changes

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

N/A

@tzolov tzolov self-assigned this Feb 25, 2025
@tzolov tzolov added bug Something isn't working server labels Feb 25, 2025
Copy link
Contributor

@tzolov tzolov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zekozhang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants