
getRandomSession function in the reuse browser example, which filter out the existing connected browser sessions using connectionIdqueue() with single page and closes that immediately. So I should be able to re-use the browser in multiple worker as there might be 10-15 pages without any issue I guess in same browser. Or it's limited to single connection only and I will get error if I try to use a browser which is currently in use on any other worker?page.goto randomly freeze and worker stops processing any more URL from queue() or 15 minutes
A browser instance gets killed if it does not get any command for 60 seconds, freeing one instance.
https://www.google.com/maps/?force=litehttp://maps.google.com/?force=canvastext: 'workers.api.error.no_access_to_browser_worker [code: 10088]' Is this still in Private Beta?
getRandomSessionconnectionIdconst sessionsIds = sessions
.filter(v => {
return !v.connectionId; // remove sessions with workers connected to them
})
.map(v => {
return v.sessionId;
});queue()queue()page.gotoA browser instance gets killed if it does not get any command for 60 seconds, freeing one instance.https://www.google.com/maps/?force=litehttp://maps.google.com/?force=canvastext: 'workers.api.error.no_access_to_browser_worker [code: 10088]'compatibility_flags = [ "nodejs_compat" ]
node_compat = true "@cloudflare/next-on-pages": "^1.11.0",
"@cloudflare/puppeteer": "^0.0.6", ⨯ Error: Failed to load external module node:stream: TypeError: Native module not found: node:streamimport { Stream } from "node:stream";
globalThis.Stream = Stream;