The diff for this file is too large to render

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Problem

When viewing a diff in a commit or pull request page this warning is encountered:

The diff for this file is too large to render. You can still retrieve it manually with the following Git command.


A similar message can be shown:

Your diff is too large to search Searching the first 1000 lines

or:

The list of changes is too large to render. Showing the first 1,000 files

Cause 1.

The number of lines in the file associated with the source in the diff view exceeds the page.max.diff.lines value (10,000 by default).

Cause 2.

The number of changes associated with the source in the diff view exceeds the page.max.changes value (1,000 by default).

Resolution for Cause 1.

If the file associated with the diff contains more than 10,000 lines, eg. 12384 lines, the following property will need to be added to the bitbucket.properties file and set to at least double the file length.

page.max.diff.lines=24768

If the file contains less than 10,000 lines, and this warning is displayed, then the default has already been updated to a value less than 10,000. Check your bitbucket.properties file for this property.

Resolution for Cause 2.

If the file associated with the diff contains more than 1,000 changes, eg. 2,000 changes, the following property will need to be added to the bitbucket.properties file and set to a value that is not lower than the number of changes in the diff, eg.

page.max.changes=2000

Bitbucket Server will always need to be restarted for changes on the bitbucket.properties file to take effect.

As mentioned in this resource - Bitbucket Server config properties - Paging:

This is intended as a safeguard to prevent enormous requests from tying up the server for extended periods of time and then generating responses whose payload is prohibitively large. The defaults configured here represent a sane baseline, but may be overridden by customers if necessary.

Caution should be exercised if these settings are changed and the application will need to be monitored for any adverse behaviour.

Last modified on Jun 24, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.