A user on an Android phone tried to download a 4.1 GB video from VidGrab (https://vidgrabhd.com) — a full-length show in high quality, exactly the kind of job the site is built for. The download ran for about ten minutes, stopped at 135 MB, and when their browser tried to resume it, the server answered "File not ready." They started over. Same thing at 296 MB. Same dead end on resume. Nothing in the error suggested the real problem, because the real problem was embarrassing: we were deleting the file while they were downloading it.

Here is the mechanism. Every download on VidGrab runs as a job: the server fetches the video, prepares it in a job folder, and serves the finished file from that folder. To keep the disk from filling up, a cleanup timer deletes each job folder after the file is served — that part is by design, and it is why the site can honestly say it stores nothing. The bug was in how the timer was armed. The first time a file was requested, the code started a 600-second countdown to delete the entire job folder — unconditionally. It did not check whether a transfer was still running. Ten minutes into any large download, the folder vanished mid-stream: the video file, and the little status file that tells the server the job exists.

That one detail explains the whole failure. On Linux, an already-open file keeps streaming even after its folder is deleted, so the user's download did not stop at the ten-minute mark — it kept going until the connection broke for an unrelated reason. The moment they tried to resume, the server looked for the job, found no status file, and said 409 "File not ready." Resume was not broken. The thing resume needed to find had been swept away by our own housekeeping.

The fix is small and specific. Serving a file now stamps the job with the time it was last served, and the cleanup timer — stretched to a 30-minute window — checks that stamp when it fires. If the file was served recently, the timer quietly re-arms itself instead of deleting. A folder only disappears once it has genuinely been left alone for the full window. The privacy behaviour is unchanged: files still delete themselves, just not out from under the person downloading them.

Fixes are easy to claim, so this one got a full-scale proof instead of a spot check. I re-ran the exact job that failed for that user — the same 4.1 GB video, the same quality, the same mode — through the public site, then throttled my own download to about 250 KB/s so it would still be running long past the old kill points. At the moment the old code would have deleted everything (600 seconds), the job folder, the status file, and all 4,132,314,380 bytes were intact and still streaming. I let it run to 304 MB, cut the connection on purpose, and resumed with a range request: the server answered with the correct partial content, and the resumed megabyte matched the server's copy byte for byte. Then I let the download finish the slow way, in pieces, across two more resumes. The assembled file's checksum was identical to the server's original. All 4.1 GB, bit for bit.

Two honest caveats. First, the 600-second timer was not the only wall a giant file can hit: a single transfer on our server setup also has a time limit of its own, so for multi-gigabyte files on slow connections, resume is not a luxury — it is the mechanism that makes the download possible at all, which is exactly why breaking it mattered so much. Second, this class of bug is invisible to the person who writes it. Every small and medium download finished inside ten minutes, so the daily automated tests passed and the site looked healthy. Only a real user, on a real phone, pulling a genuinely big file, ever stood in the blast radius. If you run anything with a cleanup job, the lesson generalises: never let housekeeping delete something without asking whether it is still in use — and make your timers prove it before they fire.

VidGrab is still what it was: free, no sign-up, TikTok without watermark, YouTube up to 4K, YouTube to MP3, and files that delete themselves after you take them — now on a timer that waits until you are actually done. There is also a free Chrome extension (https://vidgrabhd.com/static/vidgrab-extension-v1.zip) that sends any video page to the downloader in one click, if you would rather not copy links around.

If you download big files and something still breaks, I would rather hear about it than not: https://vidgrabhd.com