chunked file uploads with plupload

Holy tamole…

Have been wrestling with a client project using ‘plupload’ with a user base consistently uploading files from 150-500meg on a daily basis. They’d been uploading to youtube/vimeo mostly, because the experience with the older uploader (still plupload earlier version) was bad – slow, mostly, but some issues about determining whether items were uploaded/processed correctly (files sent to third party for processing).

Joined a project and the other dev had been working on a revamp, and had put some new things in place to help with logging/notifications/etc, but as we rolled it out to the main production site today, word had come back that “this is still really slow”.

I’ve only got 5mpbs up at the office, so it was hard for me to judge/test. Working with the PM, who had much faster upload, we tested a 344meg file. We got about 9:40 upload time. Ugh…

Spent a lot of time looking at lots of potential issues – any network throttling? Any firewall stuff? Error logs? Apache settings? Dug deeper and noticed that ‘chunk_size’ in plupload was set to 1m. Hrmm…. let’s change that to 5m.

Tested upload again, and got 5:12. Changed to 8m, got 4:40. Changed to 10m, got 4:39. Uploaded same file on vimeo.com and got 4:32, so we’re definitely in the ballpark on what the end users are accustomed to.

Whew… case solved…

Similar Posts

  • Four Thousand Weeks

    I’m starting to read “Four Thousand Weeks” from Oliver Burkeman. I initially listened to much of the audio book, then bought a copy (link above to Amazon – no affiliate link). Have not finished yet, but the core message of the book seems to be There’s certainly more to it than this, and again, I’m…

  • Bad I9 PDF form

    Have been needing to programmatically fill out an I9 PDF, retrieved from gov site. Should be fairly straightforward, right? Well… the field names are… a mess. Field names like topmostSubform[0].Page1[0].U\.S\._Social_Security_Number__Last_4_numbers_[0]topmostSubform[0].Page1[0].expiration_date__if_applicable__mm_dd_yyyy[0] topmostSubform[0].Page2[0].Employers_Business_or_Organization_Address_Street_Number_and_Name[0] and so on make it pretty… not straightforward to create a usable key/value combination to search and replace. But… today, I noticed it got…

  • MySQL speed boost

    I hit a problem the other day with concurrent queries causing deadlocks.  Using innodb gives you a lot of protection with respect to transaction support, but it carries a moderate amount of overhead, and unless you’re aware of what’s going on, you may be paying a higher price which can eventually cause performance or deadlock…

  • PHP assert not working in Laravel with Sail?

    Recently, I hit a weird ‘bug’. The $file was not being created, so I’d added a quick ‘assert’ in the code, and… file_exists($file) was indeed false (checked when stepping through debugger), but assert was not stopping/failing. But… running a simple assert from command line was working. This was something different only when running under the…

Leave a Reply

Your email address will not be published. Required fields are marked *