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

  • Importance of backups

    Well… here we are.  10 years later, and … no backups.  Or… none of the data that’s important. Recently had a drive crash in my main server where this blog is hosted.  Had it happen 2 years ago, but the data was recovered, and I put everything on automatic backups.  Using virtualmin, a great control…

  • PHP Quality Tools

    Curious about checking out the quality of your PHP project, but don’t know where to start? https://github.com/jakzal/phpqa is a project providing docker images of various tools to help measure aspects of your PHP code. will run the phploc tool on your current folder But… you can alias the tool, then simply run $ phpqa <toolname>…

  • A bit of feedback…

    A small bit of feedback… that’s often what a mobile user is looking for. Haptic feedback – a quick device vibration – is great. It’s subtle, quick, doesn’t interrupt, but gives an actual *feeling* that something happened. And… on iOS, it’s harder to do without building a full ‘native mobile app’. iOS Safari doesn’t support…

  • Laravel down migrations

    I get an email newsletter from Martin Joo every week or so. The newsletters generally have some useful tips around the Laravel framework or sometimes just general development tips. I’ve learned a couple of neat tricks here and there, and will continue to receive. This morning I received an email with a Laravel ‘tip’ regarding…

  • k as in knife

    Many moons ago my earlier version of my blog had this list I use when spelling things for people over the phone. I managed to find it at archive.org and thought I’d repost… a as in aisle (or aye) b as in bdellium  c as in czar d as in djibouti e as in eight…

Leave a Reply

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