Pushing and pulling using HTTP(S) via a reverse proxy or load balancer can fail or hang when using an AJP connector on Bitbucket Server rather than an HTTP(S) connector.
(These steps are for a push; the issue can also be seen for clones, however)
- Clone a large repo from another source (reproduced with 21GB git repository on disk)
- Run Bitbucket with following properties
- Use following command to start AJP proxy to local bitbucket server
If you use http://localhost:8080/bitbucket it will go use this proxy.
- Create an empty repo.
- cd to large repo cloned earlier and push to newly created empty repo using following command
Git finishes command successfully after setting the remote branch and return the console to the user. The repository pushed through successfully.
The push hangs indefinitely.
The below exception is thrown in the atlassian-bitbucket.log file:
The same issue can happen with pulling the repository.
Use SSH for hosting, or configure Bitbucket Server with an HTTP(S) connector instead of AJP. (Note that even if using an HTTP connector it's still possible to terminate SSL at a reverse proxy or load balancer; AJP is not required for that.)