Skip to content
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

[Question]: Running Playwright in multiple threads leaves threads running idle after execution #1062

Closed
Sagar95Chakole opened this issue Dec 4, 2021 · 1 comment

Comments

@Sagar95Chakole
Copy link

Your question

In context to the discussion on the issue #623

I have implemented multithreaded model of playwright in exact same manner. I am running it inside my FastAPI application to run some tests on multithread using playwright when api requests come.

My code is working fine but once the execution comes out of threadpool executor, the spawned threads are not getting disposed and when next request comes it again creates news threads and this goes on resulting in creation of huge number of threads.

Was the solution provided the above mentioned issue link also had this problem or there might be something wrong at my end?

@Sagar95Chakole
Copy link
Author

The issue has been resolved now.
The problem was that in the init I was calling the playwright.start() method which starts connection but the stop method was not being called in teardown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant