Missed Team ’24? Catch up on announcements here.

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

why every push is executing git gc and git reflog

meabraha February 26, 2019

why every push is executing below commands in the server?

 

99099    28334  7928  0 17:40 ?        00:00:00 /usr/local/git/bin/git receive-pack /opt/atlassian-shared/bitbucket/data/repositories/86

99099    28356 28334  0 17:40 ?        00:00:00 git gc --auto --quiet

99099    28358 28356  2 17:40 ?        00:00:07 git reflog expire –all

 

As the repository size is around 10 GB, it is running for hours. When the same person pushes again, another instance of these three commands are initiated again against same directory.  

 

After some time:

 

Still running

99099    28356     1  0 17:40 ?        00:00:00 git gc --auto --quiet

99099    28358 28356  2 17:40 ?        00:00:21 git reflog expire –all  

 

Another instances running for next push

99099    31719  7928  0 17:55 ?        00:00:00 /usr/local/git/bin/git receive-pack /opt/atlassian-shared/bitbucket/data/repositories/86

99099    31736 31719  0 17:55 ?        00:00:00 git gc --auto --quiet

99099    31739 31736  1 17:55 ?        00:00:02 git reflog expire --all

 

Is it possible to disable this behavior ? It slows down the total bitbucket performance.

 

Even after sometime… still two instances are running against same directory on same server. Same commands are running on all the nodes in the cluster for this shared directory.

 

[root@XXXXXXX ~]# ps -ef | grep git

root       770 28845  0 18:01 pts/1    00:00:00 grep git

99099    28356     1  0 17:40 ?        00:00:00 git gc --auto --quiet

99099    28358 28356  2 17:40 ?        00:00:26 git reflog expire --all

99099    31736     1  0 17:55 ?        00:00:00 git gc --auto --quiet

99099    31739 31736  2 17:55 ?        00:00:08 git reflog expire --all

 

Because of this issue, users are getting below error:

 

git push origin --delete feature/XXXX-10636-rank4-update-tps-of-control-advisor

Connection reset by 16.126.51.150 port 7999

fatal: The remote end hung up unexpectedly

error: error in sideband demultiplexer

To ssh://XXXX:7999/xXX/XXXXXX.git

 - [deleted]                 feature/XXXXX-10636-rank4-update-tps-of-control-advisor

error: failed to push some refs to 'ssh://git@XXXXXXXXXXXXXXXXXX:7999/XXX/lXXXXXX.git'

 

FYI.. As advised by Atlassian, executed below command to reduce the loose objects.

git repack -Adln —keep-unreachable

 

Here is output of objects count after executing the above command.

 

warning: garbage found: objects/pack/tmp_pack_Nm1Etf

warning: garbage found: objects/pack/tmp_pack_IeALmi

count: 10360

size: 33112

in-pack: 3991287

packs: 10

size-pack: 9225714

prune-packable: 0

garbage: 2

size-garbage: 63952

 

Version details:

Atlassian Bitbucket v4.11.0 and GIT 2.4.5

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events