K
@kijijij
Investigating Frog FM generating 0 size images Found our image genartion is creating 0 size pngs. We investigated 3 avenues Frog.FM with Bun, Frog.FM with NodeJS, Frog.FM with NextJS. The results were escatitc. Our test case was to generate 10k images with 'wget {url}' which will return a PNG. The script was simple enough ```for i in {1..100}; do wget -q http://localhost:5173/test; done``` In summary all 3 avenues failed genearting images of zero size. So we are in the flux to find the best way to create these images. However the error was different for all 3 results. I had my bet on NextJS but that also failed. Does anyone kept it working under large load ?
1 reply
0 recast
1 reaction
K
@kijijij
Continue : While load testing Bun we found it's failing to allocate memory in ReSVG and failed with below error. RuntimeError: Unreachable code should not be executed (evaluating 'malloc(len)') 51 | getUint8Memory0().subarray(ptr2, ptr2 + buf.length).set(buf); 52 | WASM_VECTOR_LEN = buf.length; 53 | return ptr2; 54 | } 55 | let len = arg.length; 56 | let ptr = malloc(len); For NextJS the same load test failed with below error ⨯ Error: failed to pipe response at pipeToNodeResponse (/path/my-next-frog/node_modules/.pnpm/
[email protected]
[email protected]
[email protected]
[email protected]
/node_modules/next/dist/server/pipe-readable.js:111:15)
1 reply
0 recast
0 reaction
K
@kijijij
Continue : Load testing NodeJS failed with below error RuntimeError: unreachable at wasm://wasm/005420d6:wasm-function[795]:0x12be90 at wasm://wasm/005420d6:wasm-function[416]:0x103d7a at wasm://wasm/005420d6:wasm-function[192]:0xc815e at Resvg.render (file:///home/kush/repo/image-gen-test/my-first-frog/node_modules/.pnpm/@
[email protected]
/node_modules/@resvg/resvg-wasm/index.mjs:284:12) at svgToPng (/home/kush/repo/image-gen-test/my-first-frog/node_modules/.pnpm/
[email protected]
[email protected]
/node_modules/hono-og/utils/svgToPng.ts:16:25) at Object.start (/home/kush/repo/image-gen-test/my-first-frog/node_modules/.pnpm/
[email protected]
[email protected]
/node_modules/hono-og/lib/response.js:13:29) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
1 reply
0 recast
0 reaction
K
@kijijij
Continue: Last hope For Forg.FM Bun and Frog.FM NextJS the failure is not resulting in stopping of process. However for NodeJS the process exists, this is a great value because we can restart the process which inturn will fix the issue. We are going to add auto-restart with process and it's going to help serve the community better.
0 reply
0 recast
0 reaction