'Puppeeteer hangs when multiple instances of node are run
We have a node application which will launch a web application using puppeteer and take multiple screen shots to create a pdf file. This node application is launched from .net core using edje.js
We create a copy of node file each time a request is made to .net core and launch the process. (we control the number of instances at a given time using a queue on the .net core side)
When multiple requests create more than one file(one file for each request let's two for example), when second instance is trying to execute the puppeteer code, the first instance goes to a freeze. The second instance is able to create the file but first one never responds.
It appears as if puppeteer has an issue when dealing with multiple instances but we are not sure.
Objective is to create one file for each request from the .net core. We don't see this issue when excel or word files are created by more than one instance. The issue is with the puppeter. Not sure if we are missing any settings/configuration etc.
We have observed that first process either gets stuck at
page.evaluate method or page.waitForFunction method
It should be able to create multiple files (one for each instance) without freezing.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|