javascript - Fineuploader restarts the upload in case of delayed server response -


ran bizarre issue , looking direction.

context: uploading large files (up 100mb) in wordpress. part of process there long task running on server-side (pushing file dropbox via api using chunking), response inevitably delayed larger files. part can simulated executing php's sleep() function.

issue: fineuploader gets 100%, shows waitingforresponse message 15 seconds (server still not done processing @ point), proceeds restart upload scratch. after second try claims have received nothing server , lists upload failed. console debug messages:

[fineuploader] xhr - server response received 0 xmlhttprequest { readystate=4, timeout=0, withcredentials=false, more...} [fineuploader] responsetext =  

server logs show two requests , server echoes success json twice; in end there 2 files on server.

question: can resolve this? can return fineuploader regularly ensure there no timeout?

fine uploader has no timeout mechanism in place. if seeing timeout, either browser forcing timeout, or there appliance between browser , server timing out.

i have run issue in past when utilizing aws (amazon web services). similar situation, had perform processing server-side after entire file had been received before returning response. during processing, of course, no tcp traffic occurring. turned out elb (elastic load balancer) had tcp idle timeout of 1 minute. processing large files exceeded value, causing elb terminate request.

you can return response fine uploader when done request/upload. if want wait return "success" response fine uploader until server-side processing complete, need figure out terminating request. options either increase timeout period on device terminating request, or delegate processing separate thread server-side , return success response of file bytes have been received , in order.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -