# Pull\_prompt is making a blocking http request

**URL:** <https://forum.langchain.com/t/pull-prompt-is-making-a-blocking-http-request/495>\
**Category:** Observability & Evals\
**Tags:** python-help\
**Created:** [July 16, 2025, 12:18pm UTC](https://forum.langchain.com/t/pull-prompt-is-making-a-blocking-http-request/495 "2025-07-16T12:18:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![asleroid](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/asleroid/32/220_2.png) [@asleroid](https://forum.langchain.com/u/asleroid)\
**Post date:** [July 16, 2025, 12:18pm UTC](https://forum.langchain.com/t/pull-prompt-is-making-a-blocking-http-request/495/1 "2025-07-16T12:18:16Z")

</div>

Hi, I am building a Langgraph agent and using Langsmith Client to pull my prompts from the hub. I am getting the following error/warning from Langgraph regarding the blocking nature of the way pull\_prompt is making the http request:

LangSmithError(“Failed to GET /commits/-/ **\<prompt\_name\_here\>** /latest?include\_model=true in LangSmith API. Blocking call to socket.socket.connect\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!\n”)

---

<div class="post-metadata">

**Author:** ![madams0013](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/madams0013/32/188_2.png) [@madams0013](https://forum.langchain.com/u/madams0013)\
**Post date:** [July 16, 2025, 6:02pm UTC](https://forum.langchain.com/t/pull-prompt-is-making-a-blocking-http-request/495/2 "2025-07-16T18:02:24Z")

</div>

Thanks for flagging! To fix this, I’d recommend switching to the **async version of the LangSmith client**. [Here are some docs](https://docs.smith.langchain.com/reference/python/async_client/langsmith.async_client.AsyncClient#langsmith.async_client.AsyncClient.pull_prompt). This should prevent this error.

Let me know if this helps!
