Search code examples
apihttp-status-code-504

504 error with post API


I am running a website on a cloud service called "codeanywhere".

My website is receiving data from a separate server via post API. It worked fine few hours ago and suddenly it returns a 504 error.

I pinged the API's host url and it does not respond. But when I check the API with postman it still works fine. I have no idea what went wrong.


Solution

  • This error response(504) is given when the server is acting as a gateway and cannot get a response in time,This indicates whatever other server is taking so long that it's "timing out," is probably down or not working properly

    there are a few things you can try, just in case

    1. Check the proxy server settings in your browser or application and make sure they're correct. Incorrect proxy settings can cause 504 errors
    2. Restart the server If possible

    3. Check back with the API regularly. No doubt it'll start working again soon.