Jira logs display SQLServerException 'Time-out occurred while waiting for buffer latch type 4'
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Jira logs show SQLServerException "Time-out occurred while waiting for buffer latch type 4." The application is unavailable or very slow.
Environment
Jira connected to Microsoft SQL Database (MSSQL)
Diagnosis
In the atlassian-Jira logs you will see entries simliar to the following:
1
2
3
4
5
6
7
8
9
10
11
## Timeouts while waiting for Buffer latch 4
2022-09-20 08:57:52,521-0300 http-nio-8080-exec-80 url: /rest/api/2/issue/163311/comment; user: clevine ERROR clevine 532x1077954x78 1rlegiu 10.156.84.14,10.61.6.4 /rest/api/2/issue/163311/comment [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response
java.lang.reflect.InvocationTargetException
....
Caused by: com.querydsl.core.QueryException: Caught SQLServerException for update dbo.jiraissue
set updated = ?
where jiraissue.updated <= ? and jiraissue.id = ?
at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50) Caused by:
...
com.microsoft.sqlserver.jdbc.SQLServerException: Time-out occurred while waiting for buffer latch type 4 for page (1:107022), database ID 5.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)
Cause
This is a known bug with MSSQL servers documented by Microsoft:
Solution
Upgrade the MSSQL database to version 14.0.3025.34 or higher.
Was this helpful?