Pool not released after (a specific) Puppeteer error
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- backend
Research direction
Start in lib/pool.js around line 356, where the issue says the worker should be released after a Puppeteer detached-frame error. Reproduce or trace the detached-frame failure and subsequent pool acquisition timeout; done means failed requests release their workers so later export requests can acquire available entries without restarting the server.
Written by the indexing model from the issue text.
Description
We are running the Highcharts export server on Heroku. At some point we get some Puppeteer detached frame errors. We are not sure why, maybe because of the specific chart configs being exported (to SVG). However, those export requests crashing isn't that big of a deal, but after those errors the worker pool seems to be exhausted (old workers are not released to the pool) and all subsequent requests crash with "Error encountered when acquiring an available entry". They keep crashing until we manually restart the export server.
So in detail, we first get two of these errors (we have a minWorker pool size of 2):
Request to export server not successful. code: 400, response: {"statusCode":400,"message":"[pool] In pool.postWork: Attempted to use detached Frame 'B3381E6334D5B8B0CADB3E9197D43969'."}
After which all subsequent requests crash with:
Request to export server not successful. code: 400, response: {"statusCode":400,"message":"[pool] In pool.postWork: For request with ID e0b3bd5f9ec04233ae22320e5ab5f370 - Error encountered when acquiring an available entry: 5001.070848ms."}
Looking at the code in pool.js, the worker should be released after the first error, but for some reason it doesn't and we can't acquire any new workers afterwards. So we end up with a running export server process with no workers in the pool at all, which seems pretty useless. Only way to fix this is to (manually) restart the process.
Any help with this would be appreciated!
- Dominant language
- JavaScript
- Stars
- 368
- Forks
- 265
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from highcharts/node-export-server
-
Update Puppeteer to version 25.11.0+ to allow ARM64 linux images to run node-export-serverPossibly taken @daniatic claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
highcharts/node-export-server#686 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
highcharts/node-export-server#680 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
highcharts/node-export-server#679 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
highcharts/node-export-server#678 ·
-
Not working on s390xOpen
Difficulty 4/5 3-5 days Newbie friendliness 30/100
highcharts/node-export-server#676 ·
All issues in highcharts/node-export-server
Similar issues
-
check:passed feeds:remove
Difficulty 1/5 Under an hour Newbie friendliness 65/100
iptv-org/database#37176 · 1 comment · 1 reaction ·
Maintainers usually reply within 9 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hawk-digital-environments/HAWKI#443 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
feedback simulation workshop
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
githubnext/gh-aw-workshop#4370 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AltimateAI/vscode-dbt-power-user#2089 ·