Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] - Clean up browser and page #1218

Open
leegunwoo98 opened this issue Jan 27, 2025 · 1 comment
Open

[BUG] - Clean up browser and page #1218

leegunwoo98 opened this issue Jan 27, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@leegunwoo98
Copy link

leegunwoo98 commented Jan 27, 2025

We are currently trying to use this as a long running microservice with exposed api to accept request for getting tiktok data. However, we noticed that pages and contexts that have been detected as a bot or failed for some reason, is not being cleaned. This is evident when using non headless mode and using a global TiktokAPI instance, where we keep a certain number of active sessions and run create session when the number of active session drops below a certain threshold. This would incur increased memory consumption if the unclosed browsers and pages piles up.

@leegunwoo98 leegunwoo98 added the bug Something isn't working label Jan 27, 2025
@leegunwoo98
Copy link
Author

#1217

This PR just wraps it in a try and tries closing the page and context when it reaches an exception

@leegunwoo98 leegunwoo98 changed the title [BUG] - Your Error Here [BUG] - Clean up browser and page Jan 27, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant