[PR #29] [MERGED] Fix: Increase MCP Client Timeout to Prevent Processing Errors #34

Closed
opened 2026-02-16 03:17:24 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/notebookllama/pull/29
Author: @nick-galluzzo
Created: 7/12/2025
Status: Merged
Merged: 7/12/2025
Merged by: @AstraBert

Base: mainHead: fix/extract_file_data


📝 Commits (1)

  • 481e334 fix: Increase MCP client timeout to 120s

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/notebookllama/workflow.py (+1 -1)

📄 Description

This PR addresses the recurring timeout error where processing larger documents fails after 30 seconds. The error mcp.shared.exceptions.McpError: Timed out while waiting for response to ClientRequest occurs during the extract_file_data step because the server-side processing takes longer than the client's default timeout.


Before:

Screenshot 2025-07-12 at 11 19 51 AM

After:

Screenshot 2025-07-12 at 11 22 05 AM

The Fix

This is a quick-fix that increases the timeout for the BasicMCPClient from 30 seconds to 120 seconds. This provides a more generous and stable window for the server to complete its work, preventing the premature timeout and improving the user experience.

Future Work

While this hot fix immediately resolves the issue for users, a more robust long-term solution can still be explored. Potential improvements include:

  • Implementing an asynchronous polling mechanism where the client submits a processing job and checks for the result periodically.
  • Optimizing the backend extract_file_data workflow to reduce processing time.

I'll start working on this, but in the meantime, this hot-fix should resolve our current issues.

Related Issues


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/notebookllama/pull/29 **Author:** [@nick-galluzzo](https://github.com/nick-galluzzo) **Created:** 7/12/2025 **Status:** ✅ Merged **Merged:** 7/12/2025 **Merged by:** [@AstraBert](https://github.com/AstraBert) **Base:** `main` ← **Head:** `fix/extract_file_data` --- ### 📝 Commits (1) - [`481e334`](https://github.com/run-llama/notebookllama/commit/481e3348fed3b8ffc37fb14572e2e962fa30e438) fix: Increase MCP client timeout to 120s ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/notebookllama/workflow.py` (+1 -1) </details> ### 📄 Description This PR addresses the recurring timeout error where processing larger documents fails after 30 seconds. The error `mcp.shared.exceptions.McpError: Timed out while waiting for response to ClientRequest` occurs during the `extract_file_data` step because the server-side processing takes longer than the client's default timeout. --- **Before:** <img width="733" height="703" alt="Screenshot 2025-07-12 at 11 19 51 AM" src="https://github.com/user-attachments/assets/5d8661b5-8bdd-4fe7-b311-66aec261136a" /> **After:** <img width="749" height="493" alt="Screenshot 2025-07-12 at 11 22 05 AM" src="https://github.com/user-attachments/assets/f71937d5-8e27-4d93-b40f-35c60d9d2e29" /> --- ### The Fix This is a quick-fix that increases the timeout for the `BasicMCPClient` from 30 seconds to 120 seconds. This provides a more generous and stable window for the server to complete its work, preventing the premature timeout and improving the user experience. ### Future Work While this hot fix immediately resolves the issue for users, a more robust long-term solution can still be explored. Potential improvements include: * Implementing an asynchronous polling mechanism where the client submits a processing job and checks for the result periodically. * Optimizing the backend `extract_file_data` workflow to reduce processing time. I'll start working on this, but in the meantime, this hot-fix should resolve our current issues. ### Related Issues * Closes #26 #23 * Addresses #16 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 03:17:24 -05:00
yindo closed this issue 2026-02-16 03:17:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/notebookllama#34