Mern stack droplet when connecting to stripe webhooks gets a pending, then response is a 504. Do I need to change the mongod.conf file?

Hi all, I think I’ve figured out why I can’t get a response back from Stripe. It works locally which was my first clue. I can hit Stripe, but times out in response. Following is my error log when attempting to make a transaction via stripe. Any pearls of wisdom would be greatly appreciated!

2024/06/26 15:32:29 [error] 25994#25994: *9 upstream timed out (110: Connection timed out) while reading response header from upstream, client:, server:, request: "POST /api/membership/membership_create HTTP/1.1", upstream: "", host: "", referrer: ""

When I was following instructions to add Mongo to my droplet the below was stated:

Also, note that the database is running on port 27017 on, the local loopback address representing localhost. This is MongoDB’s default port number.

I followed the MongoDB docs below but it didn’t make a difference.

# Update the bindIp configuration to allow external connections

# network interfaces


port: 27017


I also don’t have a PORT configured in my .env file server wise, so it defaults to 5050.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
June 26, 2024

Hi there,

Are your MongoDB instance and your backend service both running on the same server?

If this is the case there is no need to change the MongoDB bind address to as your backend service should already be able to connect to the MongoDB instance locally as they are running on the same server.

You would only need to change the MongoDB bind address to if your backend service was running on an another remote server.

Can you confirm if you have both on the same server or separate servers?

If it is all on the same server, can you confirm if you’ve configured your backend service to the local MongoDB? Usually this connection string should work:

mongodb://admin:<Your MongoDB password>@

- Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel