Limits
Browser Run limits are based on your Cloudflare Workers plan.
For pricing information, refer to Browser Run pricing.
| Feature | Limit |
|---|---|
| Browser hours | 10 minutes per day |
| Concurrent browsers per account (Browser Sessions only) 1 | 3 per account |
| New browser instances (Browser Sessions only) | 1 every 20 seconds |
| Browser timeout | 60 seconds 2 |
| Total requests (Quick Actions only) 3 | 1 every 10 seconds |
The /crawl endpoint has additional limits for Workers Free plan users:
| Feature | Limit |
|---|---|
| Crawl jobs per day | 5 per day |
| Maximum pages per crawl | 100 pages |
| Feature | Limit |
|---|---|
| Browser hours | No limit (See pricing) |
| Concurrent browsers per account (Browser Sessions only) 1 | 120 per account (See pricing) |
| New browser instances per second (Browser Sessions only) | 1 per second |
| Browser timeout | 60 seconds 2 |
| Total requests per second (Quick Actions only) 3 | 10 per second |
If you are hitting concurrency limits, or want to optimize concurrent browser usage, here are a few tips:
- Optimize with tabs or shared browsers: Instead of launching a new browser for each task, consider opening multiple tabs or running multiple actions within the same browser instance.
- Reuse sessions: You can optimize your setup and decrease startup time by reusing sessions instead of launching a new browser every time. If you are concerned about maintaining test isolation (for example, for tests that depend on a clean environment), we recommend using incognito browser contexts ↗, which isolate cookies and cache with other sessions.
If you are still running into concurrency limits you can request a higher limit ↗.
By default, a browser instance will time out after 60 seconds of inactivity. If you want to keep the browser open longer, you can use the keep_alive option, which allows you to extend the timeout to up to 10 minutes.
There is no fixed maximum lifetime for a browser session as long as it remains active. By default, Browser Run closes sessions after one minute of inactivity to prevent unintended usage. You can increase this inactivity timeout to up to 10 minutes.
If you need sessions to remain open longer, keep them active by sending a command at least once within your configured inactivity window (for example, every 10 minutes). Sessions also close when Browser Run rolls out a new release.
I upgraded from the Workers Free plan, but I'm still hitting the 10-minute per day limit. What should I do?
If you recently upgraded to the Workers Paid plan but still encounter the 10-minute per day limit, redeploy your Worker to ensure your usage is correctly associated with the new plan.
If you are hitting the daily limit or seeing higher usage than expected, the most common cause is browser sessions that are not being closed properly. When a browser session is not explicitly closed with browser.close(), it remains open and continues to consume browser time until it times out (60 seconds by default, or up to 10 minutes if you use the keep_alive option).
To minimize usage:
- Always call
browser.close()when you are finished with a browser session. - Wrap your browser code in a
try/finallyblock to ensurebrowser.close()is called even if an error occurs. - Use
puppeteer.history()orplaywright.history()to review recent sessions and identify any that closed due toBrowserIdleinstead ofNormalClosure. Sessions that close due to idle timeout indicate the browser was not closed explicitly.
You can monitor your usage and view session close reasons in the Cloudflare dashboard on the Browser Run page:
Go to Browser RunRefer to Browser close reasons for more information.
When you make too many requests in a short period of time, Browser Run will respond with HTTP status code 429 Too many requests. You can view your account's rate limits in the Workers Free and Workers Paid sections above.
The example below demonstrates how to handle rate limiting gracefully by reading the Retry-After value and retrying the request after that delay.
const response = await fetch('https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-rendering/content', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your-token>', }, body: JSON.stringify({ url: 'https://example.com' })});
if (response.status === 429) {const retryAfter = response.headers.get('Retry-After');console.log(`Rate limited. Waiting ${retryAfter} seconds...`);await new Promise(resolve => setTimeout(resolve, retryAfter \* 1000));
// Retry the request const retryResponse = await fetch(/* same request as above */);
}import puppeteer from "@cloudflare/puppeteer";
try { const browser = await puppeteer.launch(env.MYBROWSER);
const page = await browser.newPage(); await page.goto("https://example.com"); const content = await page.content();
await browser.close();} catch (error) { if (error.status === 429) { const retryAfter = error.headers.get("Retry-After"); console.log( `Browser instance limit reached. Waiting ${retryAfter} seconds...`, ); await new Promise((resolve) => setTimeout(resolve, retryAfter * 1000));
// Retry launching browser const browser = await puppeteer.launch(env.MYBROWSER); }}This Error processing the request: Unable to create new browser: code: 429: message: Browser time limit exceeded for today error indicates you have hit the daily browser limit on the Workers Free plan. Workers Free plan accounts are limited to 10 minutes of Browser Run usage per day. If you exceed that limit, you will receive a 429 error until the next UTC day.
You can increase your limits by upgrading to a Workers Paid plan on the Workers plans page of the Cloudflare dashboard:
Go to Workers plansIf you recently upgraded but still encounter the 10-minute per day limit, redeploy your Worker to ensure your usage is correctly associated with the new plan.
-
Browsers close upon task completion or sixty seconds of inactivity (if you do not extend your browser timeout). Therefore, in practice, many workflows do not require a high number of concurrent browsers. ↩ ↩2
-
By default, a browser will time out after 60 seconds of inactivity. You can extend this to up to 10 minutes using the
keep_aliveoption. Callbrowser.close()to release the browser instance immediately. ↩ ↩2 -
If you exceed the per-second rate limit, you will receive a
429response. Refer to troubleshooting the429 Too many requestserror. ↩ ↩2