New API Error 504 - Gateway Time-Out


Hi community,

Myself and our client @gmazzonegp are running into a new issue with an API file load that has arisen with no changes to our imports, the file structure, the size of the file etc.

For the last 6 weeks we have been receiving error 504 - "Gateway time-out" from API when trying to upload a file using the following URL:[WORKSPACE ID]/models/[MODEL ID]/files/opportunities_sfdc.csv
(ID's not shown for privacy)


There are other API scripts sending data from the same AWS RDS Postgresql warehouse to the same model, with much more data, that do not have this issue or error.

Additionally: This happens consistently when this integration is run, and the import works fine with the same file when we run it manually with an Action button (successful run screenshot attached). 


Anyone have any guesses here? We have been in touch with Support but the issue has been left open for 4 weeks.

Best Answer

  • gheiler
    Answer ✓

    So to update, after much back and forth we did confirm it was a timeout issue, but not the one we suspected. 

    The root culprit appears to have been the Auth Token using Certificate Auth with the API. We learned that simply adding rests between integrations and waiting for them to finish didn't fix it - Because there are many integrations running each night, in aggregate they take 45 minutes or so. Apparently that is enough time for that token to expire - which appears to be valid for 35 minutes: Obtain an authentication token - Anaplan Technical Documentation


    Thank you all for the help, especially @joeymorisette 


  • I do not have a definite answer but try:

    1. Increasing the timeout duration of the task. [if you are using snaplogic, you'll be able to set it from Task Settings]

    2. Altering the Retry Interval