mirror of
https://github.com/langchain-ai/langsmith-docs.git
synced 2026-08-27 01:41:19 -04:00
about langgraph dev --allow-blocking not take effect #80
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Yelart on GitHub (Jun 13, 2025).
ValueError("Error applying template researcher: Blocking call to io.TextIOWrapper.read\n\nHeads up! LangGraph dev identified a synchronous blocking call in your code. When running in an ASGI web server, blocking calls can degrade performance for everyone since they tie up the event loop.\n\nHere are your options to fix this:\n\n1. Best approach: Convert any blocking code to use async/await patterns\n For example, use 'await aiohttp.get()' instead of 'requests.get()'\n\n2. Quick fix: Move blocking operations to a separate thread\n Example: 'await asyncio.to_thread(your_blocking_function)'\n\n3. Override (if you can't change the code):\n - For development: Run 'langgraph dev --allow-blocking'\n - For deployment: Set 'BG_JOB_ISOLATED_LOOPS=true' environment variable\n\nThese blocking operations can prevent health checks and slow down other runs in your deployment. Following these recommendations will help keep your LangGraph application running smoothly!")