Removing `remote = true` solved the

Removing remote = true solved the problem in dev but not in production. I redeployed worker, but the request still hangs. Nothing in logs...😭
5 Replies
samjs
samjs2w ago
Hey @blindChicken . Mind DMing me you account ID, and ideally the code you're running? I'll see if I can figure out what's going on
blindChicken
blindChickenOP2w ago
Will do, I'll be back at my desk in a few minutes.
samjs
samjs2w ago
Thanks for sharing that with me. I'm not seeing anything in the logs that's suggesting the issue is coming from any of the platform. Given what you're describing I wonder if the problem is wrangler? What version are you running/did you update it recently?
blindChicken
blindChickenOP2w ago
⛅️ wrangler 4.38.0 Re: did I update recently, yes. I can't remember when exactly but a few days ago. This morning the request is failing, instead of simply hanging. It is throwing the following error:
Mongodb error message: Server selection timed out after 30000 ms
Mongodb error message: Server selection timed out after 30000 ms
So it appears that this is an issue with my MongoDb binding. But, the issue is only affecting a single endpoint. All other features of the app work without issues, I can interact with the database without issue. And, everything works when running it locally. OK! The issue is on my end, I was making two consecutive calls/connections to the database and the second call fails. This is only a problem in production due to the difference in the implementation of Node TLS package on workers. Locally the issue doesn't arise because it's running in a Node environment. I will need to ensure that the first connection is closed before making the second or carrying out both operation using the first connection. Sorry for the trouble.
samjs
samjs2w ago
Ah okay, glad to hear you were able to resolve it!

Did you find this page helpful?