-
Notifications
You must be signed in to change notification settings - Fork 11
Investigate unreleased threads causing thread limit #420
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
base: main
Are you sure you want to change the base?
Investigate unreleased threads causing thread limit #420
Conversation
Co-authored-by: rohanmarwaha222 <rohanmarwaha222@gmail.com>
|
Cursor Agent can help with this pull request. Just |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Co-authored-by: rohanmarwaha222 <rohanmarwaha222@gmail.com>
…cutor info Co-authored-by: rohanmarwaha222 <rohanmarwaha222@gmail.com>
Co-authored-by: rohanmarwaha222 <rohanmarwaha222@gmail.com>
Stop shutting down the shared thread pool in
getTopContextsto prevent thread churn and "can't start new thread" errors.The
ThreadPoolExecutorAdapterwas being used as a context manager ingetTopContexts, which caused its__exit__method to callshutdown()on the underlyingThreadPoolExecutorafter every request. This constant recreation and shutdown of the thread pool under load was identified as the primary cause of the "can't start new thread" error on Railway. This change ensures the shared executor remains long-lived.