Report this

What is the reason for this report?

Mern stack getting 504 when trying to connect to Stripe webhooks

Posted on June 10, 2024

Hi all, my 504 bad gateway time-out log says Request failed with status code 504\n at https://my_website/static/js/main. My app is build via a droplet. Of course it works locally… Any suggestions or help would be greatly appreciated, thanks!



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!

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.

Heya @swimminglapiswalrus,

I’ll recommend you to check the Application logs rather than your Nginx’s logs. In the application logs you should be able to see the specific error behind this behavior.

Once you have the error you can further troubleshoot the issue.

Hey!

What I could suggest here is to check your server logs to identify any internal server errors or bottlenecks that might be causing the delay.

Also, the 504 error is quite generic, but to find a more meaningful message, you could check your fogs from your web server (like Nginx or Apache) and application logs from Node.js will be particularly useful.

Also, what might help is to check the Stripe dashboard to see if the webhooks are failing from Stripe’s end and review any provided error messages or logs.

Besides that, what I could suggest here is to use a tool like curl or possibly Postman to simulate webhook calls to your server to ensure it can handle them appropriately. That way you could run the request from your laptop and see if the issue is on the server side or on the Sripte side.

Feel free to share more details once you have the extra debugging info here!

- Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.