-
Notifications
You must be signed in to change notification settings - Fork 15.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frequent Request timed out #1929
Comments
Same here. We use Langchain to power a GPT chat bot. When migrating from the Python openai library to langchain, we started seeing more of those TimeoutError as the traffic increases. They happen on other async calls as well. Here's how we use LangChain.
|
Answering my own question. ConversationEntityMemory doesn't work well in an async context. Under the hood, the entity resolution is done synchronously. Which breaks async application with high traffic. |
have you ever used a proxy? I also encountered the same async request problem after using a proxy. if this, you can test adding openai proxy in your import openai
openai.proxy = {
"http": "http://127.0.0.1:7890",
"https": "http://127.0.0.1:7890"
} it works fine for me. refer to langchain-ai/chat-langchain#30 |
My program run on Azure, there is not need to use proxy。I fix this problem but rewrite all sync code to async。 |
这个好使 |
After sending several requests to OpenAI, it always encounter request timeouts, accompanied by long periods of waiting.
Env:
OS: Ubuntu 22
Python: 3.10
langchain: 0.0.117
Request time out
TimeoutError from None
Have other people encountered similar errors?
The text was updated successfully, but these errors were encountered: