The request failed with HTTP status 413: Request Entity Too Large.
search cancel

The request failed with HTTP status 413: Request Entity Too Large.

book

Article ID: 172865

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

The customer is receiving errors in the NS logs or Agent logs referring to:

The request failed with HTTP status 413: Request Entity Too Large.

 

This message can appear during many different processes, such as replication or when a client machine is trying to register to a Task Server:

The request failed with HTTP status 413: Request Entity Too Large.

-OR-

A non-fatal exception occurred during replication. the replication job will be restarted from the last check point, Job ID: {GUID}

The request failed with HTTP status 413: Request Entity Too Large.

Environment

ITMS 7.6, 8.0, 8.1, 8.5, 8.6

Resolution

How to determine entity size:

* Add extra logging in IIS to reveal content length of the request

* W3SVC log will start capturing additional info such as:

#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2022-10-06 19:41:55
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken cntlength
2022-10-06 19:41:52 fe80::6172:99bc:1d27:e8f6%5 POST /Altiris/Workflow/ServerMonitoring.asmx - 80 - fe80::6172:99bc:1d27:e8f6%5 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.42000) - 200 0 0 612 570 812 286

* This value is specified in bytes and will help to capture the size of request content for /Altiris/NS/Services/ItemReplicationWebService.asmx webservice when replication fails.

 

Please try the following:

Note: if this is happening during a replication or stand-alone replication, apply the suggested changes on both servers.

  1. Open IIS.

  2. Navigate under Default Web Site>Altiris

  3. Scroll down to Management section in the middle frame and open "Configuration Editor".

  4. Select following section (drop down at the top) "system.webServer" and expand it, then locate serverRuntime.

  5. Find there the current value of "uploadReadAheadSize" value, which you can modify

  6. Change it to 10485760(10MB) for example (or determine content size as explained above)...if it helped then we can try to decrease it until we find a smaller size (but still larger than the default 49152) that keeps the warning "The request failed with HTTP status 413: Request Entity Too Large." for happening.

  7. After modifications please restart w3wp (from the command prompt, run IISRESET)
     

----------------------------

Additional setting which known to prevent replication due to entity size is system.webServer/security/requestFiltering

maxAllowedContentLength with default 30000000 value. Increase this setting accordingly.

---------------------------

NOTE:
If the suggestion above did not help then try to increase size of HTTP headers:
MS KB article explains all those settings:
http://support.microsoft.com/kb/820129 

Create the following DWORDs, both with the value 65534

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters\MaxFieldLength 
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters\MaxRequestBytes