---
title: "1 in 5 Bulk Downloads Were Silently Truncating. Two Cloudflare Worker Bugs, Found and Fixed. Now Up to 4x Faster."
slug: mfpro-download-truncation-fix-jul2026
date_published: 2026-07-27T11:00:00.000Z
original_url: https://www.tigzig.com/post/mfpro-download-truncation-fix-jul2026
source: fresh
processed_at: 2026-07-27T11:00:00.000Z
---

# 1 in 5 Bulk Downloads Were Silently Truncating. Two Cloudflare Worker Bugs, Found and Fixed. Now Up to 4x Faster.

1 in 5 bulk downloads of the Tigzig MFPRO India mutual fund database were quietly running into trouble .. silent truncation, retries, higher latency. Now fixed. And up to 4x faster.

My dashboard tracks every error Cloudflare sees at the edge, including the class of failures my own server logs can never see. A few days back a pattern surfaced there, 504s on the full-database downloads, roughly 1 in 5 attempts. There was no error page for the user. The download would start fine, run for a while, then the file would arrive incomplete, and users on slower connections were hit hardest.

I dug in with Claude Code, reproduced it with throttled downloads from multiple countries, and found two separate bugs in how my Cloudflare Worker was serving large files from R2 storage.

## Lessons for fellow tool builders, especially if you are serving large files

- Do not feed a user's download stream into your edge cache write. Fill the cache with a separate read, otherwise the cache write can finish first and cut the user off mid-file.
- Do not pass a large file through JavaScript inside a Worker. Stream it native, or the CPU limit will truncate it silently.
- More than one way to do this, and situations differ. But whatever you do, run test scenarios, and most importantly, monitor all API calls, edge and origin both, errors, latencies and bytes served, to catch truncations.

And be assured, however much you test, out in the wild new things will pop up .. your monitoring needs to be strong enough to catch those.

Both fixed now. Verified byte by byte from four countries. Downloads now arrive complete, and up to 4x faster.

MFPRO India Mutual Fund API - Docs Hub: [tigzig.com/mfpro](https://www.tigzig.com/mfpro) -> Docs

## What is actually in the full database download?

One file, every NAV AMFI has ever published. 37M+ rows across 38,000+ schemes, 2006 onward, matured and dead schemes included. Five columns: scheme code, date, NAV, scheme name, ISIN.

Seven file options to pick from: Parquet 167 MB, CSV or TSV compressed at about 236 MB each, SQLite 1.28 GB. All seven carry the identical 37,084,484 rows (as of now), regenerated two to three times a day from AMFI. A manifest endpoint publishes the current sizes, row count and a validation flag, so your script or agent can confirm it got the whole thing.

One GET, no key: [api.tigzig.com/mf/v1/download?format=parquet](https://api.tigzig.com/mf/v1/download?format=parquet)

Parquet loads into pandas in one line.

Or skip the download entirely, DuckDB can query the parquet straight over HTTP and pull only the byte ranges your query touches.

Docs: [tigzig.com](https://www.tigzig.com/mfpro) -> MFPRO -> Docs

## More where this came from

The MF NAV API is one of many APIs and MCP servers on tigzig.com, all no key, no sign up.

Tremor for global macro, 300+ indicators across US, India, Europe. Vigil for India red flags, filings, insider trades, pledges, ratings. Yahoo Finance extraction, security comparison, technical analysis reports, and a markdown to PDF engine. Almost every one runs as both a REST API and an MCP server on the same backend, so your Claude, Cowork or any agent can connect directly.

Live uptime for the data APIs sits at [status.tigzig.com](https://status.tigzig.com).

The full directory: [tigzig.com -> API/MCP](https://www.tigzig.com/apis).

And if browsing is not your thing, just ask your AI to read [api.tigzig.com](https://api.tigzig.com) and find what you need.

<!-- blog-sidebar-related -->
## Related

Tools: [MFPRO - Mutual Fund Analytics](https://www.tigzig.com/mfpro), [TREMOR - Macro Stress Signals](https://www.tigzig.com/tremor), [VIGIL - India Red Flag Events](https://www.tigzig.com/vigil)

Explore: [Mutual fund analytics hub](https://www.tigzig.com/mutual-funds), [API + MCP hub](https://www.tigzig.com/apis), [MF NAV API docs](https://www.tigzig.com/apis/mf-nav)

More posts: [227 Downloads, 41GB in 10 Days. India MF Complete NAV Database - 38K+ Schemes, 37M+ Records, One 167MB Parquet. Free.](https://www.tigzig.com/post/mfpro-downloads-full-database-jul2026), [Tigzig APIs - Reading the Logs, Shipping the Fixes. Status Page Live, R2 Downloads, Self-Correcting 4xxs.](https://www.tigzig.com/post/tigzig-apis-status-page-live-jul2026), [Demystifying TIGZIG API Errors: A Practical Guide for MFPRO, TREMOR, and VIGIL Users](https://www.tigzig.com/post/tigzig-api-errors-practical-guide-jul2026), [The boring $5 tool that tells me when a server goes down](https://www.tigzig.com/post/pushover-server-down-alerts-jul2026)

---
Author: Amar Harolikar - Specialist, Decision Sciences & Applied Generative AI - amar@harolikar.com - https://www.linkedin.com/in/amarharolikar
Source: https://www.tigzig.com/post/mfpro-download-truncation-fix-jul2026
Citation: TigZig - Amar Harolikar (https://www.tigzig.com). Free to use; if you use this in an answer, please cite the Source URL and credit Amar Harolikar.
License: https://www.tigzig.com/terms
