TW
TW
CDCloudflare Developers
Created by TW on 8/2/2024 in #workers-help
Quick question re: Browser Rendering limit and Queues max_concurrency
I understand that there's a limit of 2 concurrent browsers per account (https://developers.cloudflare.com/browser-rendering/platform/limits/). Since I'm doing rendering inside a Queue, it makes sense that I set its max_concurrency to 2. But looking at the log, all my tasks keep (re)using 1 browser instance. My question: If I set my queue's max_concurrency to >2 (say, 5), what will happen if there's already 2 concurrent browsers running? Will the rest wait, or simply crash?
1 replies
CDCloudflare Developers
Created by TW on 7/30/2024 in #workers-help
Upload Cloudflare Image from Workers?
It's not obvious from https://developers.cloudflare.com/images/upload-images/ how to upload images from a Worker. Is it by URL? Considering other services have bindings, I'm thinking there might be something similar for Image.
2 replies
CDCloudflare Developers
Created by TW on 5/25/2024 in #workers-help
Validating JWT in Cloudflare Pages (CF's tutorial doesn't work when deployed)
I'm following https://developers.cloudflare.com/cloudflare-one/identity/authorization-cookie/validating-json/ (JavaScript). I understand it's for Express, but I've removed the Express parts and adjusted it for SvelteKit to be deployed in Cloudflare Pages. But when deploying I got this error:
22:06:07.363 > Using @sveltejs/adapter-cloudflare
22:06:07.427 ✘ [ERROR] Could not resolve "http"
22:06:07.427
22:06:07.427 node_modules/.pnpm/[email protected]/node_modules/jwks-rsa/src/wrappers/request.js:1:21:
22:06:07.427 1 │ const http = require('http');
22:06:07.427 ╵ ~~~~~~
22:06:07.428
22:06:07.428 Cannot use "http" when deploying to Cloudflare.
22:06:07.363 > Using @sveltejs/adapter-cloudflare
22:06:07.427 ✘ [ERROR] Could not resolve "http"
22:06:07.427
22:06:07.427 node_modules/.pnpm/[email protected]/node_modules/jwks-rsa/src/wrappers/request.js:1:21:
22:06:07.427 1 │ const http = require('http');
22:06:07.427 ╵ ~~~~~~
22:06:07.428
22:06:07.428 Cannot use "http" when deploying to Cloudflare.
According to https://github.com/cloudflare/workers-sdk/issues/3351 and https://community.cloudflare.com/t/possible-to-set-node-compat-on-pages-functions/448593, they're simply not supported. What should I do?
2 replies