#Intermittent Payload Issue on Specific Routes

1 messages · Page 1 of 1 (latest)

winged crystalBOT
#

has anyone ever encountered this issue w/ Payload before?

I seem to be getting it on some routes but not all, and it's very difficult to trace... I'm wondering if it has anything to do with there being multiple calls to payload on a given route?

nova boughBOT
#

Original message from @zinc trout - Moved from #general message

lament reef
#

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

zinc trout
#

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

lament reef
#

Are you using the postgres adapter? Or is this vercel-postgres adapter?

#

Or is it mongo

zinc trout
#

postgresAdapter

#

with supabase

lament reef
#

Can you try swapping it out for the vercel-postgres adapter?

zinc trout
#

sure thing, will try this now

lament reef
#

I think serverless timeouts are giving you some trouble here

zinc trout
#

I'll give it a try and lyk !

#

so i'll need another connection string than DATABASE_URI ?

lament reef
#

The second example

zinc trout
#

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

lament reef
#

It's the same!

zinc trout
#

ahh okay, so the key just has to match then?

lament reef
#

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

zinc trout
#

Thank you! this seems to have worked 🙂

lament reef
#

Woohoo! Very nice, I'm glad! Happy to have helped