You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When my LangServe app gets ~1000 concurrent requests, it breaks with error:
OSError: [Errno 24] Too many open files
socket.accept() out of system resource
Mitigation/quickfix
I've checked the soft ulimit of the VM, it was only 1024, while the hard limit is 524288. I've increased the soft limit to be 100000, which should mitigate the issue for now.
Better way of doing it?
I'm curious if there's a better way of handling this issue. Even with the increased limit of allowed open files, is there something I can do in my app to make it better/more resilient?
Problem
When my LangServe app gets ~1000 concurrent requests, it breaks with error:
Mitigation/quickfix
I've checked the soft
ulimit
of the VM, it was only1024
, while the hard limit is524288
. I've increased the soft limit to be100000
, which should mitigate the issue for now.Better way of doing it?
I'm curious if there's a better way of handling this issue. Even with the increased limit of allowed open files, is there something I can do in my app to make it better/more resilient?
What my code looks like
I define chains like this, straightforward:
and pass them to the router:
I'm calling this service from a separate
nestjs
application, like this:There's a bunch of documents, and for each I'm calling
callAiReview
method.Are there things in the app that can be improved? Maybe async?
Should I use
async
in LangServe? How?I'm aware that I could use
batch
instead ofinvoke
, but other than that, are there improvements to be made?How to make LangServe work with production load?
The text was updated successfully, but these errors were encountered: