Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Pushing to BitBucket Gives "413 Request Entity Too Large" But No Large Files Edited

I am trying to push a local repo (initial commit) into BitBucket using SourceTree. SourceTree gives the following error:

413 Request Entity Too Large

However, the largest file in my repo is 995kb and I get this even if I exclude it. The entire repo is about 36mb.

I set the http.postBuffer to some arbitrarily large value in my local git.

LFS is enabled in the repo.

I get the same error from command line.

TIA for any help.

 

2 answers

If you have a reverse proxy like Apache or Nginx sitting in front of the Bitbucket application, and you are attempting to push to http:// or https:// you'll likely have to tweak a parameter in your reverse proxy.

Nginx example:

http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

Thank you, I have referred this to the appropriate people at my company. In the meantime I was able to push using ssh.

To follow on Justin's point, we just resolved this issue for one our clients. We did so by updating the following to the NGINX  Configuration: 

  • Go to /etc/nginx
  • Open the nginx.conf
  • Add the following lines to the configuration:
    • client_max_body_size 500M;
    • client_body_timeout 120s;
  • Restart NGINX

Apache has a similar setting I believe that needs to be updated as well. 

Like # people like this

I was experiencing the same issue, however not by pushing to Bitbucket repository, but by posting code insights via REST API as described at https://developer.atlassian.com/server/bitbucket/tutorials-and-examples/code-insights-tutorial. The posted JSON has few kilobytes. The curl was giving me just HTTP 413.

We use the Official Bitbucket Docker image, with no Apache nor Nginx in front of Bitbucket, so I was wondering, where is the error coming from. After looking into the response body it turned out to be a hard limit of annotations count allowed to be posted within the report to 1000. The response was:

{"errors":[{"context":null,"message":"Max annotation limit would be exceeded. Only 1,000 annotations can be stored for a single report","exceptionName":null}]}

 

Hope it helps someone stumbling upon a similar issue.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,570 views 1 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you