Hi everyone,
We are using the Bitbucket Server REST API to post build statuses to commits from our Jenkins pipelines:
Endpoint:
POST /rest/api/latest/projects/{projectKey}/repos/{repoSlug}/commits/{commitId}/builds
This has been working fine earlier, but recently we started getting 500 Internal Server Error consistently, even though there were no changes on the Jenkins side.
Verified:
Example:
POST https://<bitbucket>/rest/api/latest/projects/C/repos/code/commits/<commitId>/builds
Body: state=INPROGRESS, key=TEST-123, name=TEST, url=https://test
Response:
500 Internal Server Error with message: “An error occurred while processing the request”
Additional notes:
Questions:
Environment: Bitbucket Server (self-hosted), Jenkins pipelines.
A 500 error on the build status API with no changes on the Jenkins side almost always points to something changing on the Bitbucket Server side.
As the very first thing to do, check the Bitbucket Server logs. The most important log is "BITBUCKET_HOME/log/atlassian-bitbucket.log". The 500 response you see is a generic internal server error, but the server log will contain the full stack trace with the actual root cause. Look for entries around the timestamps of your failed requests.
Thanks, I checked the Bitbucket logs and found the following error around the same timestamps as the failed build status API calls:
com.microsoft.sqlserver.jdbc.SQLServerException: Could not allocate space for object 'dbo.AO_C77861_AUDIT_ENTITY'.'pk_AO_C77861_AUDIT_ENTITY_ID' in database 'bitbucket' because the 'PRIMARY' filegroup is full due to lack of storage space or database files reaching the maximum allowed size. Note that UNLIMITED files are still limited to 16TB. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
Other Bitbucket operations such as:
are still working normally. The issue seems to affect only the build status API calls.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.