Cached model and parallel requests #1852
-
I'm working on a server that can handle multiple concurrent requests. Initializing the Synthesizer class takes a long time, so I initialize the class once and then reuse it for each request. This works fine if the requests are made in series. But when I make several parallel requests, I get errors
Is there any way to reduce time of initialization of Synthesizer class and still avoid errors during parallel requests? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Maybe a Synthesizer pool would work, if you have Hardware the can handle multiple Synthesizer. |
Beta Was this translation helpful? Give feedback.
-
Hello,have you solved this problem?Would be nice if you share the code,I'm facing the same problem. |
Beta Was this translation helpful? Give feedback.
Maybe a Synthesizer pool would work, if you have Hardware the can handle multiple Synthesizer.
How many request do you need to handle?