I am building a Reactive Web App using version 11.

I am attempting to upload file using the platforms Upload widget.

Files upload ok, unless the upload takes longer than 10 seconds.  If the call to the server action to upload the file takes over 10 seconds an error is displayed "There was an error processing your request." and the logs show "[ErrorScreen] The connection has timed out".

In my testing, that appears to mean my files are effectively limited to around 7MB (slow internet in Australia).

Does anyone know how to extend the timeout, without affecting the timeout of other actions?

Or is there another way of uploading large files?

I suspect I could chunk the files, but I only want to do that if there is no better way.

Hi Stuart,

Did you try the SetRequestTimeout action from HTTPRequestHandler module?

If you set it to -1 you have an infinite timeout, which would allow you to upload larger files.

Regards,

Daniel

Hi Daniel,

Yes, thank you, I just noticed that now, but didn't know about -1!

Thats great, problem solved!

Kind regards,

Stuart

Actually, I'm not sure that will do the trick, as the request will not get to the action in order to call SetRequestTimeout, because it is still uploading.

Although I did manage to find the ServerRequestTimeout. It appears when you drag a server action onto a client action. I'll let you know how it goes.

Hi Stuart,

Yes maybe for React it is different, I am not sure. It works for traditional web apps.

Regards,

Daniel

Solution

Hi Daniel,

Well you set me on the right path anyway, so thank you for that.

I have confirmed that for Reactive Web Apps increasing the Server Request Timeout on a server action within a client action will allow large files to upload. I changed it from the default 10 seconds, to 100 seconds.

I tried SetRequestTimeout within the action, but it timed out before it was called.

I would probably avoid using -1, and just set it to a value large enough to support the expected bandwidth and file size for the intended application (maybe make it a Site Property).

Solution

Hi Stuart,

Out of curiosity, where do you call the SetRequestTimeout?

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Stuart,

Out of curiosity, where do you call the SetRequestTimeout?

Regards,

Daniel

I called SetRequestTimeout at the start of the server action that was called from the client.


Ok, nice you got it working.

Yes, in the end it was just user error! ;P