Hi all,

I've been gathering data on uploads failing under Windows with Error #2038 lately, and I've found a definite cause. It might not be what's causing them all, but it certainly is in my case.

WinXP + Kaspersky AntiVirus.

I've tested on about a dozen machines, with differing versions of XP service packs and patches, and I've got 100% correlation. With Kaspersky enabled, it fails every time under IE6/7/8, Firefox and Chrome, and I haven't seen a single failed upload with it disabled or not installed.

The symptoms are as follows - say you're uploading a 20MB file, the progress bar streaks ahead to about 5MB uploaded within the first second or two, then stalls. Sometime within the next couple of minutes, the upload fails, and the server sees the connection close prematurely.

With smaller files, the same streaking/stalling problem happens, but the upload sometimes completes successfully. I assume there's some timeout window that smaller files can slip through.

I tested it on apache2 with a rails app behind it, and nginx running with nginx_upload_module to catch the request, and both behaved identically.

Next: test whether other antivirus packages cause similar problems, and find a solution that doesn't involve just turning antivirus off!

Cheers
@ben_h