Set keep-alive timeout for FastMCP servers to 720 seconds
Added the `timeout_keep_alive` parameter to FastMCP initialization in both GPT Researcher and SMD Researcher servers. This ensures connections remain active for longer, improving server reliability for long-lived client interactions.
This commit is contained in:
parent
12503a4453
commit
ba48f44321
2 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ logging.basicConfig(
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Initialize FastMCP server
|
||||
mcp = FastMCP("GPT Researcher", host="0.0.0.0", port=8000)
|
||||
mcp = FastMCP("GPT Researcher", host="0.0.0.0", port=8000, timeout_keep_alive=720)
|
||||
research_type = os.getenv("RESEARCH_TYPE", "deep")
|
||||
|
||||
# Initialize researchers dictionary
|
||||
|
|
|
@ -26,7 +26,7 @@ logging.basicConfig(
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Initialize FastMCP server
|
||||
mcp = FastMCP("SMD Researcher", host="0.0.0.0", port=8000)
|
||||
mcp = FastMCP("SMD Researcher", host="0.0.0.0", port=8000, timeout_keep_alive=720)
|
||||
|
||||
@mcp.tool()
|
||||
async def smd_detail_article(article_id: str) -> dict:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue