Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Node.js, PHP and APIs

A Logic Apps HTTP action fails once the content passes 100 MB

Your error

BadRequest. Http request failed as there is an error: 'Cannot write more bytes to the buffer than the configured maximum buffer size: 104857600.'

Fix it fast

Most common cause, 1 of 3

The HTTP action moves more than 100 MB with chunking off

On the designer, open the HTTP action, choose Settings, and set Allow chunking to On under Content transfer.

Fix
"HTTP": {
  "type": "Http",
  "inputs": {
    "method": "GET",
    "uri": "https://files.example.com/export.csv"
  },
  "runtimeConfiguration": {
    "contentTransfer": {
      "transferMode": "Chunked"
    }
  }
}
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

"Cannot write more bytes to the buffer than the configured maximum buffer size: 104857600" means an action moved more than 100 MB, the default Azure Logic Apps message limit, without chunking. Turn on Allow chunking in the HTTP action's settings, feed it from a Compose action instead of a variable, or raise the host.json limit on Standard.

  • Applies to Azure Logic Apps Consumption (multitenant), Azure Logic Apps Standard (single-tenant)
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

Ask the endpoint how big the content is and whether it can send it in parts. A Content-Length above 104857600 confirms the size limit; Accept-Ranges: bytes tells you chunked download will work.

Run this first
curl -sI https://files.example.com/export.csv | grep -iE 'content-length|accept-ranges'

Then find the line you see in this list and open its fix:

  1. 1The HTTP action moves more than 100 MB with chunking offContent-Length is over 104857600 and the action's Settings tab shows Allow chunking set to Off
  2. 2Chunking is on, but the action reads its body from a variable or the triggerAllow chunking is already On, yet the same buffer error appears, and the action's body is an expression such as triggerBody(), variables('...') or a function call
  3. 3A Standard logic app still uses the default 104857600-byte host limitsThe workflow runs on a Standard (single-tenant) logic app, and the endpoint cannot do partial content, so chunking is not an option

What does the error look like?

  • BadRequest. Http request failed as there is an error: 'Cannot write more bytes to the buffer than the configured maximum buffer size: 104857600.'

Cause 1 of 3

The HTTP action moves more than 100 MB with chunking off

You seeContent-Length is over 104857600 and the action's Settings tab shows Allow chunking set to Off

Check

The 104857600-byte buffer error is the 100 MB message size limit that both Consumption and Standard workflows apply when chunking is off. For built-in HTTP actions, chunking is the only way Logic Apps can take in a larger message. Unless the endpoint already sends its content in chunks, you have to switch chunking on in the action itself.

Check
grep -n '"contentTransfer"' workflow.json || echo "chunking not set on any action"

Fix

On the designer, open the HTTP action, choose Settings, and set Allow chunking to On under Content transfer. In code view the same switch is the runtimeConfiguration block. Downloads need an endpoint that answers range requests with 206 Partial Content; uploads need an endpoint that follows the Logic Apps chunk protocol.

Fix
"HTTP": {
  "type": "Http",
  "inputs": {
    "method": "GET",
    "uri": "https://files.example.com/export.csv"
  },
  "runtimeConfiguration": {
    "contentTransfer": {
      "transferMode": "Chunked"
    }
  }
}

Verify

The endpoint answers the range test with 206, and the run history shows the HTTP action as Succeeded. Its outputs hold only the body, because status code and headers are not returned once chunking is on.

Verify
curl -s -o /dev/null -w '%{http_code}\n' -H 'Range: bytes=0-1023' https://files.example.com/export.csv

Confirmed by learn.microsoft.com

Did this fix it?

Cause 2 of 3

Chunking is on, but the action reads its body from a variable or the trigger

You seeAllow chunking is already On, yet the same buffer error appears, and the action's body is an expression such as triggerBody(), variables('...') or a function call

Check

A chunk-enabled action cannot use trigger bodies, variables or expressions as its input. When it does, the chunking never starts, so the 100 MB limit applies again.

Check
grep -nE "triggerBody\(\)|variables\('" workflow.json

Fix

Put the data into a Compose action first, then point the chunk-enabled action at body('Compose').

Fix
"Compose": {
  "type": "Compose",
  "inputs": { "body": "@variables('bigPayload')" }
},
"Upload": {
  "type": "Http",
  "inputs": { "method": "PUT", "uri": "https://files.example.com/upload", "body": "@body('Compose')" },
  "runAfter": { "Compose": ["Succeeded"] },
  "runtimeConfiguration": { "contentTransfer": { "transferMode": "Chunked" } }
}

Verify

The action now succeeds with content above 100 MB, and the run history shows Compose feeding it.

Verify
grep -n "body('Compose')" workflow.json

Confirmed by learn.microsoft.com

Did this fix it?

Cause 3 of 3

A Standard logic app still uses the default 104857600-byte host limits

You seeThe workflow runs on a Standard (single-tenant) logic app, and the endpoint cannot do partial content, so chunking is not an option

Check

On Standard, several host settings default to exactly 104857600 bytes: Runtime.ContentLink.MaximumContentSizeInBytes for any single input or output, and Runtime.Backend.HttpOperation.MaxContentSize for HTTP actions. A third one, Runtime.FlowRunActionJob.MaximumActionResultSize, caps the combined inputs and outputs of one action at 209715200 bytes. Microsoft's limits page says the single-tenant message size can be changed through host settings; a Consumption logic app has no such switch.

Check
grep -n 'MaxContentSize\|MaximumContentSizeInBytes' host.json || echo "defaults in use"

Fix

Stop the logic app, add the settings under extensions.workflow.Settings in host.json (Kudu console in the portal, or the project root in VS Code), save, then restart. The values below are an example; pick sizes the plan's memory can hold.

Fix
// host.json: keep your existing "version" and "extensionBundle" entries
"extensions": {
  "workflow": {
    "Settings": {
      "Runtime.ContentLink.MaximumContentSizeInBytes": "209715200",
      "Runtime.Backend.HttpOperation.MaxContentSize": "209715200"
    }
  }
}

Verify

After the restart, a new run of the same workflow gets past the HTTP action.

Verify
grep -n 'MaxContentSize' host.json

Confirmed by learn.microsoft.com

Did this fix it?

How do I stop it coming back?

  • Before you point a workflow at an export or file endpoint, record its typical size and whether it answers range requests, so you know if chunking will work.
  • Feed large payloads to actions through Compose from the start instead of storing them in variables.
  • On Standard, keep host.json under source control so a raised size limit survives redeploys.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine on the same stack: Raheeb.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.