How to avoid 504 Gateway Time-out errors with REST when uploading large files?

I am uploading a video file that is just about 1.5GB.  I am uploading the file via the csf/temporary endpoint, in 20 m-byte chunks.

The file uploads fine, no errors.  But when I create the Media object via the /media/{appid}/files endpoint, referencing the context ID of the video, and after some time I get a 504 "Gateway Time-out" error.

I thought perhaps that the server needed some time to reassemble the file (unloaded in 73 parts) before I called the Create Media endpoint, so I added a 2 minute pause between uploading the file and creating the Media object.  This did not help.

After some time I am able to check the site, and the Media object was created, even though there was a timeout error.

My assumption is that the timeout is coming from the server, because the server is returning a 504 code and my app has no set timeouts.

My question is, is there any way to avoid the timeout error?  My script need to get the return data from the Create Media endpoint and log it, so that I can be sure that the Media item was actually created.

Parents Reply
  • Hi ,

    It would be great to get any info on this.

    Telligent version 10.2.4.5233

    Telligent is hosting the server, and we didn't configure CSF, so it would be whatever your defaults are.

    The Create Media call times out at 60 seconds, and returns the 504 error.  There are no exceptions on the Monitoring page.

    Unless I can find a better solution I am going to need to (step 1) upload the video, let it timeout, and then (step 2) run a script that fetches all Media content to find the content and get the ID/URL.  I'm hoping to find a better solution.

    Thanks.

Children
No Data