Thursday, April 13, 2017

Delay after uploading large files with Jquery BlueImp uploader

Leave a Comment

I'm able to successfully upload large files (tested up to 8GB) via the BlueImp Jquery Uploader plugin.

My PHP settings are:

upload_max_filesize 8192M post_max_size 8192M max_execution_time 200 max_input_time 200 memory_limit 8192M 

The problem I'm having is that when large files (2gb or larger) finish uploading, the progress bar hangs on 100% and takes considerable time to "finish". I'm not sure what post processing is happening, other than piecing the file chunks together.

I've tried adjusting the chunk size in the UploadHandler.php file, and it seems to improve things slightly when increased (e.g from 10mb to 500mb chunks) but the delay is still there. There doesn't seem to be any improvement when disabling chunked uploads altogether (0), and I'm not sure of the potential ramifications of doing this also.

On a 2gb file, the delay is around 20 seconds, but on a 4gb file, it's around 2 minutes. A 7gb file takes around 3-4 minutes, and sometimes times out. This leaves the user waiting, unaware of what is happening as the progress bar has finished at 100% by this point.

Does anyone have any insight as to what this might be, or how to go about troubleshooting it? I suspected that the file in /tmp might be being copied rather than moved, but there's no sign of this in the php file as far as I can tell.

Boosting the CPU and RAM on my server VM improves things a little, though running the "top" command during this process reveals that CPU and RAM don't appear to be extensively exhausted (0-2%, compared to 90-100% during actual upload).

Many thanks in advance.

1 Answers

Answers 1

I don't know very much about it , i search on google and i found some , i think it might help you.

Normally “onError” event is fired when exception occurs on Server or Client. In the mentioned situation there is no exception thrown until the Server itself does not time out.

One possibility is to monitor the upload status and set JavaScript timeout or counter in uploading event that will cancel the upload after reached time limit.

All upload status and error codes are shown here - http://help.infragistics.com/NetAdvantage/jQuery/2013.1/CLR4.0?page=igUpload_Using_Client_Side_Events.html

You can monitor these with “fileStatus” argument in uploading event.

Link Which will help you

  1. Link1
  2. Link2
  3. Link3
If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment