Internal Server Error when uploading a file



  • Hi,

    Our cloud backend has objects with data files attached to them. When creating those object using the C++ API, I sometimes get an "Internal Server Error" when uploading the data. Creating the actual objects seems to never fail, only the upload part.

    I start the upload in the finished signal of the request where we create the object. Most of the times it succeeds, but sometimes it fails, so I have to implement a robust retry mechanism.

    I understand that there could be edge cases where an upload would fail, but it happens in more than 10% of the cases. The files are approximately 1MB in size. Is this expected behaviour? Are there best practices I have to follow? Or could this be a bug in the cloud service?

    Greetings,
    Jeroen Dierckx



  • “Internal Server Error” is always the server side error



  • Yes, I understand. But am I causing it?

    I iterate over the recordings that I want to upload, and for each one I create a request to create the object, and in its completed callback upload the file. I don't wait for one recording to be completed before I start with the new one. Could that be causing the issues? Should I implement a queue myself so all requests are done serially?



  • You are doing that in the right way, I do not think you can workaround it differently then checking for 500 error in the finished handler and retry.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.