Only 2 browser per min at the same time for browser worker?

I couldnt find a suitable tag so I tagged Cloudflare API Here's the link saying "Only 2 browser per min at the same time for browser worker" https://discord.com/channels/595317990191398933/1112675059174219866/1232468960172052490 1. How can we put them in a queue? Or what's the canonical way to prevent parallel requests? 2. Is there a way we can wait longer for all images to load in '@cloudflare/pupeeter' like this network idle param? https://github.com/puppeteer/puppeteer/issues/1552#issuecomment-350954419
GitHub
When to use networkidle2? · Issue #1552 · puppeteer/puppeteer
I'm reading the docs for networkidle2 and understand what it will do but the docs don't really outline its use or why 2 connections instead of 1 or 5. Basically when should one use this flag?
2 Replies
Chaika
Chaika2mo ago
The docs have an example of using a Durable Object to persist a browser session and keep sending requests: https://developers.cloudflare.com/browser-rendering/get-started/browser-rendering-with-do/ I haven't played around with much of pupeeter's options with CF's version of it, but why not just try that param with cf? Their version of pupeeter is just a fork, unless they purposefully removed that
Cloudflare Docs
Deploy a Browser Rendering Worker with Durable Objects · Browser Re...
By following this guide, you will create a Worker that uses the Browser Rendering API along with Durable Objects to take screenshots from web pages …
mrbirddev
mrbirddev2mo ago
The docs have an example of using a Durable Object to persist ...
I've adapted the DO scripts and it's running. Getting some errors like below when sending parallel requests. Still trying and maybe it's just me
"exceptions": [
{
"stack": " at async Object.fetch (index.js:13803:16)",
"name": "Error",
"message": "Navigation failed because browser has disconnected!",
"timestamp": 1714014789752
}
],
"exceptions": [
{
"stack": " at async Object.fetch (index.js:13803:16)",
"name": "Error",
"message": "Navigation failed because browser has disconnected!",
"timestamp": 1714014789752
}
],
I haven't played around with much of pupeeter's options with CF's version of it
Apologies. Cool about this. It's in the page.goto function not page.screenshot