500 Server error when deployed to Cloudflare #1103
-
Good morning, I have a SvelteKit implementation of Lucia (v2.5) using PlanetScale and deployed to Cloudflare pages. It's just the simple username and password example from the documentation. Everything works well in development, but when deployed I get a 500 server error when a user tries to sign-up, and with it being in a production environment I'm finding it difficult to debug what's happening. The same build deploys correctly to Vercel I'm just wondering if there are any known issues about this setup I should be aware of which may be causing this problem? Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
If you’re using the free plan, there isn’t enough compute resource for password hashing |
Beta Was this translation helpful? Give feedback.
-
Any update on this issue @MattHeslington? We are trying to deploy a SvelteKit application with Lucia / Planetscale on Cloudflare Pages and we are facing very similar issues. |
Beta Was this translation helpful? Give feedback.
I had similar issues, I am also using planetscale and sveltekit on CF pages. As Pilcrow mentioned it was due to Sveltekit fetching and CF returning a "resource limit exceeded HTML page". I worked out this was the case by using the streaming log's feature and then I could see the errors and my console.log output.
I was already on the default "paid plan" and using the default "bundled" pricing model. It only allowed 50ms of execution. I have found that the function takes a median of around 200-300ms..
CF would let these requests sporadically go through. I moved to the "unbundled" function pricing model and this has sort of fixed the issue, I am now on the new pricing scheme which also sort…