Cloudflare Worker "exceeded CPU" Error on Auth Endpoint - Seeking Troubleshooting Insights

I've set up a Cloudflare Worker to handle an authentication endpoint. However, I'm encountering an error that states 'exceeded CPU'. I'm trying to understand the potential causes for surpassing the allocated CPU bandwidth. Any insights or troubleshooting suggestions would be greatly appreciated.

app.post('/signup', async (c) => {
    const { email, password } = await c.req.json();
    const auth = initializeAuth(c.env.TURSO_DB_URL, c.env.TURSO_AUTH_TOKEN);

    try {
        const userDetails = await auth
            .createUser({
                key: {
                    providerId: 'email',
                    providerUserId: email,

                    password,
                },
                attributes: {},
            })
            .catch(console.log);
        console.log(userDetails);
        return c.json({ status: 'ok' });
    } catch (e) {
        return c.json({ status: 'error', message: e });
    }
});
Was this page helpful?