Defunct process issue under latest version
See original GitHub issue[Using puppeteer-sharp under asp.net .net core 2.2 keeps defunct chrome processes when Puppeteer object is disposed]
Steps to reproduce:
- Install asp.net core 2.2 api
- With simple request call puppeteer, lunch browser, get content close browser
- Observe a lot of defunct processes
- Sooner or later observer Docker: “No space left on device”
using (var browser = await Puppeteer.LaunchAsync(options).ConfigureAwait(false))
{
var allPages = await browser.PagesAsync().ConfigureAwait(false);
var page = allPages.First();
try
{
await page.SetBypassCSPAsync(true);
await page.SetRequestInterceptionAsync(true).ConfigureAwait(false);
DisableMediaContent(page);
// navigation to page omitted here
}
}
What I am doing wrong? Any recommendations are much appreciated. Thank you in advance.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
What is a <defunct> process, and why doesn't it get killed?
From your output we see a "defunct", which means the process has either completed its task or has been corrupted or killed, but...
Read more >Defunct processes on AIX
A defunct process, also known as a zombie, is simply a process that is no longer running, but remains in the process table...
Read more >Processes in a Zombie (Z) or Defunct State | Support
Defunct ("zombie") processes are child processes that have terminated, but have not been reaped by the parent. See ps(1). If a parent process ......
Read more >How to identify and kill zombie/defunct processes in Linux ...
When a process dies on Linux, it isn't all removed from memory immediately its process descriptor stays in memory. The process status becomes ......
Read more >Problem Killing Defunct Process - Operating Systems
Sometimes, (usually due to bad programming) process stay in "defunct", this means that the process doesn't exist anymore, but there is still an ......
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
I ran into some issues when running Puppeteer-Sharp on a machine with low resources. I did this:
Not clean at all. But if Chromium can’t gracefully close itself. I would force kill it.
It’s turned out that issue is not related to puppeteer it self but for docker nature. In order to wipe zombies I used this solution https://github.com/Yelp/dumb-init. For anyone who faced with same issue, please use dumb-init.
Thanks all.