Bamboo build fails to publish artifact due to HTTP 413 Request Entity Too Large.
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
Bamboo build fails to publish artifact due to HTTP 413 Request Entity Too Large.
Diagnosis
The following is present in the remote agent log; <bamboo-agent-home>/atlassian-bamboo-agent.log:
1
2
3
4
INFO | jvm 1 | 2017/07/24 08:53:46 | 2017-07-24 08:53:46,212 INFO [0-BAM::remote-agent-name::Agent:pool-3-thread-1] [AbstractArtifactManager] Publishing [Artifact-Name] for PROJ-PLAN-JOB-#: 1 file(s) matching [**/*] in directory /home/bamboo/bamboo-agent-home/xml-data/build-dir/PROJ-PLAN-JOB
INFO | jvm 1 | 2017/07/24 08:53:46 | 2017-07-24 08:53:46,213 INFO [0-BAM::remote-agent-name::Agent:pool-3-thread-1] [AbstractArtifactManager] Trying to publish the artifact with handler: com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler
INFO | jvm 1 | 2017/07/24 08:53:50 | 2017-07-24 08:53:50,240 INFO [0-BAM::remote-agent-name::Agent:pool-3-thread-1] [BambooArtifactHttpTransport] Finished writing the artifact to the output stream, time elapsed: 3.994 s
INFO | jvm 1 | 2017/07/24 08:53:50 | 2017-07-24 08:53:50,241 ERROR [0-BAM::remote-agent-name::Agent:pool-3-thread-1] [BambooArtifactHttpTransport] Unexpected HTTP status code: HTTP/1.1 413 Request Entity Too Large
The error is not present in the build log. The build log simply states:
1
error 24-Jul-2017 08:53:50 Unable to publish artifact [Artifact-Name]:
Cause
The Reverse Proxy or Load Balancer handling HTTP traffic between the remote agent and Bamboo Server is rejecting the request because it's too large.
Solution
Resolution
Increase this limit in the proxy configuration. For example:
NGINX: The
client_max_body_size
property, set in thenginx.conf
file will control this limit. See the NGINX documentation for more details:Apache HTTPD:
LimitRequestBody
orLimitRequestFieldSize
in thehttpd.conf
file, or other appropriate Apache conf file. See the Apache documentation on these properties for further information:IIS: Adjust the UploadReadAheadSize metabase property, like below by replacing <value in bytes> with the value in bytes. The default value is 48KB.
cscript adsutil.vbs set w3svc/1/uploadreadaheadsize <value in bytes>
Was this helpful?