Chunky for Craft CMS

Troubleshooting

“The server rejected a chunk … as too large”

Something between the browser and Craft returned a 413. Craft never saw the request, so there is nothing in the log.

In order of likelihood:

  1. nginx client_max_body_size — defaults to 1 MB. Set it above the chunk size:

    client_max_body_size 8m;
    
  2. A CDN or proxy cap. Cloudflare's free plan stops at 100 MB per request.

  3. Apache LimitRequestBody, if the host has set one.
  4. post_max_size, if PHP is the one refusing — though that usually produces an empty $_POST rather than a 413.

Or lower Chunky's chunk size, which needs nobody's permission.

Every upload fails immediately, whatever the file

Check Settings → Plugins → Chunky. If upload_max_filesize or post_max_size is marked as a problem, the chunk size does not fit through PHP. Lower it until the report is clean.

Uploads work, but nothing is chunked

The browser is posting straight to assets/upload. Either:

  • the file is smaller than the chunk size, which is the intended behaviour;
  • the plugin, or the setting for that particular uploader, is switched off; or
  • the uploader is one Chunky does not decorate — a user photo, a site image, or another plugin's.

To confirm, look for ChunkyConfig in the page source. If it is missing, the script never loaded; if it is present with "enabled": false, the plugin is off.

“Chunk starts at N but only M bytes have been received”

The browser sent a chunk that would leave a hole in the middle of the file, so it was refused rather than written. Normally this only happens if two uploads collided on the same identifier, and the upload will fail cleanly and can be retried.

“Couldn’t assemble … from its parts”

The reassembled file was not the size the browser said it would be. The detail is in the Craft log under the chunky category. Usual causes are a full disk, or storage/runtime being cleared under a running upload.

The disk is filling up

Every abandoned upload leaves a .part file behind. php craft chunky/partials reports what is there; php craft chunky/partials/cleanup sweeps it. If they are accumulating, Craft's garbage collection is not running — the same thing that would leave orphaned drafts and stale caches behind.

A big upload succeeds, then the asset is missing

Check the volume's own limits. Once assembled, the file goes through Craft's normal asset creation, and a remote filesystem may have its own ideas about size. The failure will be in the response and in the Craft log, not in Chunky.

Uploads slow to a crawl on a good connection

Try a larger chunk size. Each chunk is a full request with its own round trip and its own PHP bootstrap, so a 2 GB file at 1 MB a time is two thousand of them. 8 MB or 16 MB is reasonable on a server you control; the ceiling is whatever the environment report says fits.