CourseModel Context Protocol: The Complete Course · Module 5: Building Servers · part 40 of 77
Part 40 · Module 5: Building Servers

Incident: A log line that froze a stdio server

9 min read·13 Oct 2026
Module 5 · Incident file · About 30 minutes

What happened

24 Nov 2025 #1656 opened 1 May 2026 #2527: hang 18 May 2026 closed as dup 13 Oct 2026 #1656 still open python-sdk logging issues, as recorded on GitHub
The hang (red) was filed in May 2026 and closed as a duplicate (grey) of an older logging bug that was still open in October 2026 (amber).

On 1 May 2026 a developer, mdbro, opened issue #2527 on the official MCP Python SDK. Its title begins "FastMCP.__init__ clobbers root logger with INFO RichHandler" and ends "hangs stdio servers under back-pressure" (python-sdk issue #2527). Their server ran on mcp 1.27.0, Python 3.12.12 and macOS, started over stdio by a Node.js host, qwen-code.

The report traces a hang. Creating the server called configure_logging("INFO"), which attached a Rich handler on stderr to the root logger, the logger every other logger in the process passes its lines to. A library the tool used, the HTTP client httpx, then logged a line per request at INFO. The host did not read the server's stderr fast enough, so those lines could, in the issue's words, "fill the kernel's stderr SNDBUF and block the asyncio main thread on the next write(2)." A py-spy stack trace in the issue shows a call_tool handler stuck inside Rich's console write. The host eventually gave up on the server.

WHERE THE SERVER WAS STUCK (FROM THE ISSUE'S PY-SPY TRACE) call_tool the MCP handler qdrant scroll library call httpx log.info one INFO line Rich console write blocked in write(2)
The tool handler (blue) called a library whose log line (amber) went to a console write that never returned (red).

On 18 May 2026 a maintainer closed it: "Closing as a duplicate of #1656", naming the same root cause. Issue #1656, "FastMCP configures logging on init, which messes up application-level logging", was opened on 24 November 2025 against 1.22.0 and labelled a bug (python-sdk issue #1656). When we fetched it on 13 October 2026 it was still open; a comment of 5 October 2026 says the pull request meant to fix it, #2532, was closed without resolving it. The issues record no data loss: the cost was a server that stopped answering, and a debugging session with py-spy to find out why.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.