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
@yuvipanda Thanks. I'm happy to see that this library is useful for you.
You are right, in an asynchronous world these threads become obsolete but I keep it for compatibility reasons. I can port this swagger-api/swagger-codegen#8061 - so the thread pool will be created on demand (probably never). WDYT?
In https://github.com/tomplus/kubernetes_asyncio/blob/master/kubernetes_asyncio/client/api_client.py#L69, a new ThreadPool is created per ApiClient. A lot of other objects (such as Watch) create an ApiClient per use, leading to lots of ThreadPools being created. ThreadPools aren't free - on my machine, merely instantiating a ThreadPool object (similar to what's happening here) starts 8 threads.
Very soon this becomes too many threads, and CPU usage / time for everything shoots up way high - bringing everything else to a halt.
In this client, the ThreadPool shouldn't be used at all, so we should remove it.
The text was updated successfully, but these errors were encountered: