[BUG] - playwrights runs in multitudes
See original GitHub issueMy code is essentially is a loop over
tt = api.getTikTokById(video['id'],proxy=proxy,custom_did=custom_did)
bytes = api.get_Video_By_TikTok(tt['itemInfo']['itemStruct'],proxy=proxy,custom_did=custom_did)
api get created in the begin of the program.
Due to some reason, playwrights did not stop and runs until the program finishes. They merrily eats all CPU and memory, at number of 20-30 they causes my machine to hang.
Actually, after some processing, it yields
6816498522741918981 info...loading...6816498522741918981 is video/mp4...done.
6813478929186245893 info...loading...Error at 90 Protocol error (Runtime.enable): The page has been closed. loading 6813478929186245893 error.
6830234382377258245 info...Error at 90 Target page, context or browser has been closed loading 6830234382377258245 error.
And after stop I still see
tarkhil 9917 0.0 0.0 6892 1704 ? SNs 14:03 0:00 /bin/bash /home/tarkhil/.cache/ms-playwright/webkit-1383/pw_run.sh --inspector-pipe --headless --no-startup-window --proxy=socks5://148.xxx.xxx.247:1080
tarkhil 9922 0.5 0.0 104291544 3176 ? SNl 14:03 0:12 /home/tarkhil/.cache/ms-playwright/webkit-1383/minibrowser-wpe/bin/MiniBrowser --inspector-pipe --headless --no-startup-window --proxy=socks5://148.xxx.xxx.247:1080
Should I reinint API on each run and kill all subprocesses after?..
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Nica Burns Warns of Problems Facing Theatres in 2023
Nica Burns has warned that theatres are facing a multitude of problems in 2023. Appearing on BBC Radio 4's Front Row programme, ...
Read more >10 British Contemporary Playwrights You Should Know
Read our guide to contemporary British theatre and see which names are turning London's stages into some of the most creative and original...
Read more >The insect apocalypse: 'Our world will grind to a halt without ...
All of them are prey for a multitude of birds, bats, spiders, reptiles, ... the largest and longest-running scheme of its kind in...
Read more >Bug (play) - Wikipedia
Bug is a play by American playwright Tracy Letts. Exploring themes of paranoia and conspiracy theories, the play tells the story of a...
Read more >The Multitude That We Are | Poets & Writers
In this virtual reading and conversation examining the multitude of identities, authors Usha Akella, Manuel Muñoz, and Suzi Q. Smith read their work...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This happens because a new BrowserContext is created upon each request and never closed. I am not sure if a new context is needed each time or not, but to fix the current issue keeping functionality the same:
create_page
instead of a pagecreate_page
to instead create a page afterwards with the returned contextcontext.close()
after the operation finishes instead ofpage.close()
(You will have to reorder the operations insign_url
since the currentpage.close()
is after the return statement)great - thanks!!