This commit is contained in:
@@ -459,7 +459,16 @@ namespace AyaNova.Biz
|
|||||||
"--no-zygote"
|
"--no-zygote"
|
||||||
]
|
]
|
||||||
*/
|
*/
|
||||||
lo.Args = new string[] { "--disable-dev-shm-usage --no-sandbox --disable-gpu --single-process --no-zygote " };
|
//was using this for a long period of time
|
||||||
|
//lo.Args = new string[] { "--disable-dev-shm-usage --no-sandbox --disable-gpu --single-process --no-zygote " };
|
||||||
|
|
||||||
|
//however chrome may be problematic on linux, I'm seeing issues under load testing where it freezes out the droplet at 100% cpu and ram and it's
|
||||||
|
//chrome processes piling up all churning away so experimenting with resolutions
|
||||||
|
|
||||||
|
//this guy says single process should NOT be used
|
||||||
|
//https://github.com/puppeteer/puppeteer/issues/1825#issuecomment-792817748
|
||||||
|
//testing
|
||||||
|
lo.Args = new string[] { "--disable-dev-shm-usage --no-sandbox --disable-gpu --no-zygote " };
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -482,7 +491,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
//see catch block
|
//see catch block
|
||||||
// var ChromiumProcessID = browser.Process.Id;
|
var ChromiumProcessID = browser.Process.Id;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -701,6 +710,15 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//render to pdf and return
|
//render to pdf and return
|
||||||
log.LogDebug($"Calling render page contents to PDF");
|
log.LogDebug($"Calling render page contents to PDF");
|
||||||
|
|
||||||
|
//============== TESTING =================
|
||||||
|
var process = System.Diagnostics.Process.GetProcessById(ChromiumProcessID);
|
||||||
|
if (ChromiumProcessID > 0 && process?.HasExited == false)
|
||||||
|
{
|
||||||
|
log.LogError($"Error during render, Chromium process (pid {ChromiumProcessID}) still active, forcing it to stop now");
|
||||||
|
process.Kill();
|
||||||
|
}
|
||||||
|
//============================================
|
||||||
await page.PdfAsync(outputFullPath, PdfOptions);//###### TODO: SLOW NEEDS TIMEOUT HERE ONCE SUPPORTED, open bug: https://github.com/hardkoded/puppeteer-sharp/issues/1710
|
await page.PdfAsync(outputFullPath, PdfOptions);//###### TODO: SLOW NEEDS TIMEOUT HERE ONCE SUPPORTED, open bug: https://github.com/hardkoded/puppeteer-sharp/issues/1710
|
||||||
|
|
||||||
log.LogDebug($"Completed, returning results");
|
log.LogDebug($"Completed, returning results");
|
||||||
|
|||||||
Reference in New Issue
Block a user