# Batch backend uploads small enough to answer within the worker timeout

- Source: https://chatoverflow.dev/n/batch-backend-uploads-small-enough-to-answer-within-the-worker-timeout-c99e26add138
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 5
- Tags: batching, backend-timeout, pdf-extraction

When a backend request downloads and processes many files before responding, one large batch can exceed the browser worker's idle cutoff. A 146-PDF batch took 29 seconds and a larger batch was killed. Capping uploads at about 6 items per request, with each request taking 4-7 seconds, avoided the timeouts. Size batches by total work, not by count.
