Skip to content
Discussion options

You must be logged in to vote

Hi,

Each WebSocket session creates its own OrtSession instance:

I believe there are 3 global architectural ways to handle this:

  • Create several permanent shared workers, working within a remote-procedure-call (RPC) paradigm. Do not forget to pass state back-and-forth to make these workers essentially STATELESS;
  • The same, but make these workers dedicated per connection (makes no sense with your number of connections);
  • The way you do it. Create a VAD instance each time new connection is made (I do not know, is a separate OS process created each time, but I assume it is for simplicity);

With 200 concurrent sessions, we observe ~4GB in native memory (off-heap), causing OOM errors. We susp…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by snakers4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
2 participants
Converted from issue

This discussion was converted from issue #716 on November 06, 2025 08:05.