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: 24.193.166.172, server: outdoors.rest, request: "POST /api/membership/membership_create HTTP/1.1", upstream: "http://127.0.0.1:5050/api/membership/membership_create", host: "outdoors.rest", referrer: "https://outdoors.rest/"
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 127.0.0.1, 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
net:
port: 27017
bindIp: 0.0.0.0
I also don’t have a PORT configured in my .env file server wise, so it defaults to 5050.
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!
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 0.0.0.0 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 0.0.0.0 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>@127.0.0.1:27017
- Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.