sakura
sakura
Explore posts from servers
CDCloudflare Developers
Created by sakura on 9/29/2024 in #workers-help
CPU execution time graph
No description
5 replies
CDCloudflare Developers
Created by sakura on 9/20/2024 in #general-help
Unique transformations onerror behavior
The docs mention: https://developers.cloudflare.com/images/pricing/#images-transformed
A unique transformation is defined as a request to transform an original image with a combination of supported flags ↗, with the exception of the format flag.

...

The format flag being exempted from counting as a unique transformation...
A unique transformation is defined as a request to transform an original image with a combination of supported flags ↗, with the exception of the format flag.

...

The format flag being exempted from counting as a unique transformation...
If I understand correctly, onerror flag is supported for url transfomations, but not transformations from within a worker: https://developers.cloudflare.com/images/transform-images/transform-via-url/#onerror
At the moment, this setting only works directly with image transformations and does not support resizing with Cloudflare Workers.
At the moment, this setting only works directly with image transformations and does not support resizing with Cloudflare Workers.
Does this mean an image with the same resizing params (url, width, height, onerror=redirect etc.) called from a /cdn-cgi url and called from a worker will count as 2 unique transformations? Since the docs above explicitly mention the format flag is exempted from counting as a unique transformation, but onerror isn't mentioned.
2 replies
CDCloudflare Developers
Created by sakura on 9/5/2024 in #workers-help
Cron Exceeded CPU Limit
No description
6 replies
CDCloudflare Developers
Created by sakura on 8/12/2024 in #general-help
Image Transformation not working
I have a worker that makes fetch calls with resizing options using the following code. But the image doesn't actually get resized. The headers contain cf-cache-status: HIT but not Cf-Resized as I expected based on the docs - https://developers.cloudflare.com/images/reference/troubleshooting What am I doing wrong?
const response = await fetch(url, {
cf: {
image: {
height: 512,
width: 512,
},
},
})
const arrayBuffer = await response.arrayBuffer()
const headers = response.headers
// Log each header
for (const [key, value] of headers.entries()) {
console.log(`${key}: ${value}`)
}
const rawLargeBase64 = Buffer.from(arrayBuffer).toString("base64")
rawResizedImageSize = rawLargeBase64.length
console.log(`Raw image size for ${url}:`, rawResizedImageSize)
const response = await fetch(url, {
cf: {
image: {
height: 512,
width: 512,
},
},
})
const arrayBuffer = await response.arrayBuffer()
const headers = response.headers
// Log each header
for (const [key, value] of headers.entries()) {
console.log(`${key}: ${value}`)
}
const rawLargeBase64 = Buffer.from(arrayBuffer).toString("base64")
rawResizedImageSize = rawLargeBase64.length
console.log(`Raw image size for ${url}:`, rawResizedImageSize)
6 replies
DTDrizzle Team
Created by sakura on 3/7/2024 in #help
Support for sqlcommenter
Can Drizzle somehow support comments added to queries, like sqlcommentor? https://google.github.io/sqlcommenter/node/knex/#3
1 replies
CDCloudflare Developers
Created by sakura on 11/20/2023 in #general-help
Pricing Image Resizing Requests
No description
10 replies
DTDrizzle Team
Created by sakura on 10/6/2023 in #help
[Error] Using Drizzle with Neon DB
Is drizzle compatible with neon pooled connections? Neon pooled connections don't support prepared statements, and it seems like drizzle uses prepared statements internally for all requests, but I'm not sure. https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.ts#L537 https://neon.tech/docs/connect/connection-pooling -- We've been getting many issues with our nextjs/vercel serverless production app using drizzle-orm/neon-http , @neondatabase/serverless , and neon pooled connection with autoscaling. Issues like "prepared statement x doesn't exist" and db connections becoming clogged. Wondering if this might be a cause for that
12 replies
RRailway
Created by sakura on 10/4/2023 in #✋|help
Custom domain issue
I added a custom domain ( alt.sakura.fm ) to my instance, but I'm getting sakura.up.railway.app as the domain for clerk at the alt.sakura.fm page. Does railway somehow redirect to the railway generated domain internally even with a custom domain?
<script data-clerk-publishable-key="" data-clerk-domain="sakura.up.railway.app" async="" src="https://clerk.sakura.up.railway.app/npm/@clerk/clerk-js@latest/dist/clerk.browser.js" crossorigin="anonymous"></script>
<script data-clerk-publishable-key="" data-clerk-domain="sakura.up.railway.app" async="" src="https://clerk.sakura.up.railway.app/npm/@clerk/clerk-js@latest/dist/clerk.browser.js" crossorigin="anonymous"></script>
18 replies