42

I came back to some code I had open after a few hours and made some changes to the code and then pushed it. All of a sudden, I am getting this error:

sura@raitorial:~/workspace/conse (master) $ git push 
Counting objects: 15, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 492 bytes | 0 bytes/s, done.
Total 6 (delta 5), reused 0 (delta 0)
remote: canceling statement due to conflict with recovery
remote: LINE 1: ...er"."date_joined" FROM "bb_repository" INNER JOIN "auth_user...
remote:                                                              ^
remote: DETAIL:  User was holding a relation lock for too long.
remote: 
To git@bitbucket.org:sureumar__/conse.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@bitbucket.org:sureumar__/conse.git'
sura@raitorial:~/workspace/conse (master) $ 

How can I diagnose the cause of this error?

TylerH
  • 20,799
  • 66
  • 75
  • 101
LovingRails
  • 1,565
  • 2
  • 16
  • 30
  • 17
    This question should not be closed. This error can be reproduced, and it's not a typographical error on the OP's part. It's applicable to people other than the OP. This question is useful, because other people can now understand what the error message means (i.e. it's a server-side error, not a client-side). – Andrew Grimm Jun 16 '16 at 02:25
  • 1
    @AndrewGrimm when BitBucket fixes the issue on their end, who else will have the same problem? – Braiam Jun 16 '16 at 02:29
  • 2
    Big question is, *has* BitBucket fixed the issue? Agree with keeping this around until then, if for no other reason than someone will probably post another thread if we don't. – Shog9 Jun 16 '16 at 02:30
  • Vote to keep for next time this happens. As BitBucket's error doesn't include anything about their maintenance and as this may happen again, and as 1200 people have viewed this question in just half an hour. – RickMeasham Jun 16 '16 at 02:31
  • @pawanjain help them how, exactly? To move to another service that doesn't have this kind of problem? – Braiam Jun 16 '16 at 02:33
  • 8
    @pawanjain It's not necessarily a BitBucket issue. All it means is that the pre-receive hook declined your commit (which there are [questions](http://stackoverflow.com/questions/7986139/git-error-when-trying-to-push-pre-receive-hook-declined) [about](http://stackoverflow.com/questions/28318599/git-push-error-pre-receive-hook-declined) already). – hichris123 Jun 16 '16 at 02:34
  • 2
    @hichris123: The postgres error included in the response makes it a BitBucket specific issue. 1350 people have already found this Q/A on Google. I think it's worth keeping. – RickMeasham Jun 16 '16 at 02:47
  • 2
    Meta question: http://meta.stackoverflow.com/questions/326251/what-is-the-best-way-to-deal-with-a-temporal-event-which-gets-a-lot-of-attention – Andrew Grimm Jun 16 '16 at 03:01
  • 1
    @Braiam Help them understand that it's not on their end, and they should sit down and do something else until the problem is resolved. You could spend hours on this if there wasn't a high-scoring Google hit for your specific error message. – tripleee Jun 16 '16 at 07:20
  • 2
    Having said that, I *was* hesitant to vote to reopen this, and now that I see the fallout, I am doubly hesitant to do anything more. I agree that we should not be the default go-to site for simple support issues, but this is borderline IMHO, as it manifests as a Git error message. – tripleee Jun 16 '16 at 07:21
  • @tripleee I'm not sure if you have already read the *would be duplicated* if this question was about git instead of bitbucket, as the several answers and title focused about. [Git error when trying to push -- pre-receive hook declined](http://stackoverflow.com/q/7986139) – Braiam Jun 16 '16 at 17:20

1 Answers1

35

As the message indicates, this is a problem on Bitbucket's end. You can check the status of their services by visiting http://status.bitbucket.org/, which will inform you (for example):

Verifying - We are gradually restoring inbox content to mitigate any further replication issues. Any messages you'd expect to be there should re-appear slowly as we incrementally complete scheduled maintenance.
Jun 16, 03:22 UTC

Update - Maintenance on the primary database caused excessive lag on replicas used for authenticating Git and Mercurial operations over HTTPS. We've failed over to a spare replica and restored service. Please contact our support team if you're still experiencing problems with your pushes or pulls.
Jun 16, 02:48 UTC

In progress - We're seeing unanticipated complications on gitweb and hgweb traffic, which we are currently working to resolve. Please watch this page for updates.
Jun 16, 02:03 UTC

If no current issues are listed there, contact support.

TylerH
  • 20,799
  • 66
  • 75
  • 101
kuvic
  • 376
  • 2
  • 5