---
title: MessageProcessingMaxBodySize System Parameter - Maximum Message Body Size
description: MessageProcessingMaxBodySize sets the largest message body, in MB, that Nodinite processes. Larger bodies are not processed; BizTalk bodies above the limit are not copied, and the event is processed from its context. Default 250 MB.
---

# MessageProcessingMaxBodySize - System Parameter

The **MessageProcessingMaxBodySize** [System Parameter][System Parameters] sets the largest message body, in MB, that the [Logging Service][] processes. A larger body is not processed, so one very large message can't exhaust the memory of the Logging Service. For [BizTalk Server][BizTalk - Logging], a larger body is not even copied into <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>; the [Log Event][] and its context are.

![Lowering MessageProcessingMaxBodySize from 250 to 1 MB, then searching for order ORD-10250 logged with a 2.2 MB body: Processing State Failed, the Logging Service's Comment, and the Error entry in Log Audit Search, animated walkthrough (7.13)][Hero]  
*Animated walkthrough: set **MessageProcessingMaxBodySize** to `1` and **Save**. Within five minutes the limit applies: an order logged with a 2.2 MB body gets the **Failed** processing state, a [Comment][Comments] that explains why, and an **Error** entry in [Log Audit Search][] (operation *The body is too large*).*  

<h2 id="at-a-glance"><i class="fal fa-table" aria-hidden="true"></i> At a Glance</h2>

| Property | Value |
| --- | --- |
| Key | `MessageProcessingMaxBodySize` |
| Data type | integer: a whole number of MB, `1` or higher, with no upper limit |
| Default | `250` |
| Read by | [Logging Service][] (message processing, and the copy of BizTalk tracked data), [Web Client][] |
| Takes effect | Message processing: within about 5 minutes. BizTalk copy: the next copy run. No restart needed. |
| Status | ✅ Active |
| Since | <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> 5.0.0.29 |

## <i class="fal fa-gears" aria-hidden="true"></i> How It Works

What happens to a message body above the limit depends on how it reaches <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>:

| | Body logged with the [Log API][] or another [Log Agent][Log Agents] | Body tracked by BizTalk Server |
| --- | --- | --- |
| Body over the limit is | Stored, not processed | Not copied; the [Log Event][] and its context are |
| [Processing state][Processing State] | **Failed** (the key's description says *Error*) | **Completed with warnings** |
| [Search Field][Search Fields] values | From the context only; none from the body | From the context only |
| [Comment][Comments] | *…set to failed since body size was bigger than the threshold of X MB* | *…was not copied from BizTalk since it is larger than the threshold of X MB…* |
| [Log Audit][Log Audit Search] level | Error | Warning |

*How MessageProcessingMaxBodySize treats a body above the limit, by source.*

<h3 id="log-api-and-other-log-agents">Log API and Other Log Agents</h3>

When the Logging Service processes a [Log Event][] whose message body is larger than **MessageProcessingMaxBodySize**, it skips the processing of that message body (no Search Field values are read from the body; values read from the context still are) and instead:

1. Sets the processing state of the Log Event to **Failed**. The key's own description in the Web Client calls it *Error*.
2. Adds a [Comment][Comments] to the Log Event that explains why:  
   `[Logging Service] Processing State for the event was set to failed since body size was bigger than the threshold of X MB`
3. Writes an entry with level **Error** to the Log Audit (function *Process Message*, source *Nodinite Logging Service*). Find it with [Log Audit Search][] and the operation *The body is too large*:  
   `Failed to process the event. The body is too large, database: '…' on server: '…', EventId='…', MessageGUID='…', MessageTypeId ='…', OriginalMessageTypeName='…', TotalSize=…`

The body is still stored and can be opened. All other messages keep being processed. Message processing in general is described in [Message Processing][Logging Service - Message Processing] on the Logging Service page.

#### Processing State in a Log View

In a [Log View][Log Views], the message that exceeded the limit shows the **Failed** processing state.

![Log View result row of order ORD-10250, 2.2 MB, with the Failed processing state icon, a cog with a red cross (7.12)][2]  
*The Log Event exceeded the MessageProcessingMaxBodySize limit and got the **Failed** processing state. Its Order ID comes from the context, so it is still searchable.*  

#### Comment on the Log Event

The Logging Service adds a [Comment][Comments] to the Log Event, visible in the Log View.

![Comments tab of the Log Event with the Logging Service Comment: Processing State for the event was set to failed since body size was bigger than the threshold of 1 MB (7.12)][3]  
*The Comment tells users why the message was not processed.*  

#### Log Audit Entry

The Logging Service also writes a Log Audit entry for traceability.

![Log Audit Search result with the Error entry Failed to process the event. The body is too large, with the Log Database, EventId, MessageGUID, Message Type, and TotalSize, function Process Message, source Nodinite Logging Service (7.12)][4]  
*Search for these entries with Log Audit Search to find every message that was skipped because of its size.*  

<h3 id="biztalk-server">BizTalk Server: The Body Is Not Copied, the Log Event and Its Context Are</h3>

When the [BizTalk Log Agent][BizTalk - Configure Log Agent] copies tracked data from the BizTalk tracking database (BizTalkDTADb), a message body larger than **MessageProcessingMaxBodySize** is not copied to <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>. The Log Event and its context are copied, and the Logging Service processes the event from its context. Search Fields that read the context work; Search Fields that read the body find nothing. The Logging Service then:

1. Sets the processing state to **Completed with warnings**, not Error: everything that was copied has been processed.
2. Adds a [Comment][Comments] to the Log Event:  
   `[Logging Service] The body (N MB) was not copied from BizTalk since it is larger than the threshold of X MB (System Parameter MessageProcessingMaxBodySize), the event was processed from its context only`
3. Writes a Log Audit entry with level **Warning** that you can find with [Log Audit Search][]:  
   `The body was not copied from BizTalk since it is larger than the threshold of X MB, the event was processed from its context, …EventId=…, MessageGUID=…, TotalSize=…`

The copy run also records it in its own Log Audit trail:  
`N context row(s) without body: the body is larger than X MB (MessageProcessingMaxBodySize) or BizTalk tracked no body, only the context is copied`

The body size that BizTalk tracked is kept on the Log Event, so a [Log View][Log Views] still shows the size even though the body is missing.

* The size is measured per message body, including all BizTalk fragments. BizTalk stores large messages in fragments.
* A changed value applies on the next copy run, without caching. A value that is not a positive integer makes the copy use `250` MB.

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p>The body stays in the BizTalk tracking database only until BizTalk's own purge job removes it. <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> does not fetch it later if you raise the limit; as far as <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> is concerned, the Log Event is complete. See also how the BizTalk Log Agent <a href="https://docs.nodinite.com/logging-and-monitoring/microsoft-biztalk-server-logging/features/managing-biztalk-logging/#late-tracked-data">recovers late tracked data</a>.</p></div>
</aside>

<h3 id="message-type-warning-in-the-web-client">Message Type Warning in the Web Client</h3>

<sup><span class="nodinite-new-badge">New 7.11</span></sup>

The [Web Client][] compares the **Max Recent Body Size** of each [Message Type][Message Types] with **MessageProcessingMaxBodySize**. When a Message Type's recent messages are larger than the limit, a red warning badge appears in the Message Type list, the statistics panel, and the Repository panel. Use the badge to find the message flows that hit the limit.

## <i class="fal fa-lightbulb" aria-hidden="true"></i> Choosing a Value

* ✅ Keep the default `250` MB unless you need even larger messages to be processed.
* Before you raise the limit, make sure the Logging Service server has enough RAM: [MessageProcessingBatchSize][] × the largest message body is roughly what the Logging Service may hold in memory at once. Test higher values before you use them in production.
* Lowering the limit gives more protection, but messages above it are no longer searchable by their body-based Search Fields.
* The lowest value is `1`. The [Web Client][] refuses `0` or a negative number on **Save**, with the reason *Value for system parameter 'MessageProcessingMaxBodySize' must be 1 or higher (MB). 0 is not allowed.*
* For BizTalk Server, lowering the limit means that bodies above it are never stored in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>, not just unsearchable. Raising the limit later does not recover them.
* Check the Message Type warning badge before you change the limit, to see which message flows are affected.

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-hard-drive" aria-hidden="true"></i> [Logging Service][]  
* <i class="fal fa-user-tag" aria-hidden="true"></i> [Log Audit Search][]  
* <i class="fal fa-pen-to-square" aria-hidden="true"></i> [Manage System Parameters][]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-box-up" aria-hidden="true"></i> [MessageProcessingBatchSize][]  
* <i class="fal fa-timer" aria-hidden="true"></i> [MessageProcessingTimerInterval][]  
* <i class="fal fa-comment" aria-hidden="true"></i> [Comments][]  
* <i class="fal fa-server" aria-hidden="true"></i> [BizTalk - Logging][]  
* <i class="fal fa-edit" aria-hidden="true"></i> [Configure the BizTalk Log Agent][BizTalk - Configure Log Agent]  
* <i class="fal fa-envelope" aria-hidden="true"></i> [Message Types][]  
* <i class="fal fa-cog" aria-hidden="true"></i> [System Parameters][]  

[2]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/CoreServices/ConfigurationDatabase/SystemParameters/MessageProcessingMaxBodySizeProcessingStates.png
[3]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/CoreServices/ConfigurationDatabase/SystemParameters/MessageProcessingMaxBodySizeComment.png
[4]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/CoreServices/ConfigurationDatabase/SystemParameters/MessageProcessingMaxBodySizeAuditLogEntry.png

[BizTalk - Configure Log Agent]:https://docs.nodinite.com/logging-and-monitoring/microsoft-biztalk-server-logging/features/managing-biztalk-logging/
[BizTalk - Late Tracked Data]:https://docs.nodinite.com/logging-and-monitoring/microsoft-biztalk-server-logging/features/managing-biztalk-logging/#late-tracked-data
[BizTalk - Logging]:https://docs.nodinite.com/logging-and-monitoring/microsoft-biztalk-server-logging/overview/
[Comments]:https://docs.nodinite.com/getting-started/log/comments-for-logged-messages/
[Hero]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Settings/SP/SystemParameters_MaxBodySize.gif
[Log Agents]:https://docs.nodinite.com/administration/log-management/log-agents/features/what-is-a-log-agent/
[Log API]:https://docs.nodinite.com/core-services/log-api/overview/
[Log Audit Search]:https://docs.nodinite.com/administration/tools/log-audit-search/
[Log Event]:https://docs.nodinite.com/core-services/log-event/overview/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Logging Service]:https://docs.nodinite.com/core-services/logging-service/overview/
[Logging Service - Message Processing]:https://docs.nodinite.com/core-services/logging-service/overview/#message-processing
[Manage System Parameters]:https://docs.nodinite.com/administration/settings/system-parameters/manage-system-parameters/
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[MessageProcessingBatchSize]:https://docs.nodinite.com/administration/settings/system-parameters/messageprocessingbatchsize/
[MessageProcessingTimerInterval]:https://docs.nodinite.com/administration/settings/system-parameters/messageprocessingtimerinterval/
[Processing State]:https://docs.nodinite.com/administration/log-management/log-views/features/log-view-search-fields-and-processing-state/#processing-state
[Search Fields]:https://docs.nodinite.com/administration/log-management/search-fields/features/what-is-a-search-field/
[System Parameters]:https://docs.nodinite.com/administration/settings/system-parameters/overview/
[Web Client]:https://docs.nodinite.com/core-services/web-client/overview/