#Intermittent Payload Issue on Specific Routes
1 messages · Page 1 of 1 (latest)
Original message from @zinc trout - Moved from #general message
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
Documentation:
- The Admin Panel - Project Structure
- React Hooks - usePayloadAPI
- Payload Concepts - Retrieving Data - Local API
Community-Help:
Hey @zinc trout
Yeah, this is somewhat of a familiar error to me, although I've never encountered it while using Payload.
So, multiple calls in dev mode is generally fine - some things are run twice in dev-mode but that won't happen on production. More of a React thing there.
In terms of the error, can you check your NodeJS version as well as your .env to ensure you a) have a compatible node version, and b) that your env variables are properly configured and don't contain typos
Hey @lament reef - The env variables are fine. I noticed that this error occurs when I try to publish a comment entry to my Comments collection. Happens both in prod and locally
node v22.13.1
Are you using the postgres adapter? Or is this vercel-postgres adapter?
Or is it mongo
Can you try swapping it out for the vercel-postgres adapter?
sure thing, will try this now
I think serverless timeouts are giving you some trouble here
I'll give it a try and lyk !
so i'll need another connection string than DATABASE_URI ?
Hmm, have a look here: https://payloadcms.com/docs/database/postgres#usage
The second example
yeah that's what i was reading, but i'm not sure where to retrieve POSTGRES_URL. W/ supabase I used the session pooler with URI type
It's the same!
Well, only if you execute it without args
Oh, make sure all your payload versions match
In your package.json I highly recommend pinning them to the same version
Thank you! this seems to have worked 🙂
Woohoo! Very nice, I'm glad! Happy to have helped