Page edit fails with an error about snapshot size
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
Editing certain pages fails, and the user is redirected to BASEURL/pages/viewpage.action?pageId=XXXXX&editingFailed. The following message may appear on the screen:

Environment
Confluence 7.4.5 (may also occur in other versions)
Diagnosis
Check Synchrony logs (atlassian-synchrony.log) for an error like the following:
1
2
3
4
5
6
7
8
9
10
11
2020-11-19 18:14:00,351 DEBUG [439:StdOutHandler 2020-11-19 18:14:00,351 WARN [async-dispatch-8] [synchrony.sync.hubs] snapshot exceeds maximum size {:entity "/Synchrony-1a6fdedc-a84b-3a2f-ab5e-f1fb10545088/confluence-123456789", :max-snapshot-size 16777216, :actual-size 17245504, :throwable #error {
2020-11-19 18:14:00,351 DEBUG [439:StdOutHandler :cause "snapshot exceeds maximum size"
2020-11-19 18:14:00,351 DEBUG [439:StdOutHandler :data {:message "snapshot exceeds maximum size", :max-snapshot-size 16777216, :actual-size 17245504}
2020-11-19 18:14:00,351 DEBUG [439:StdOutHandler :via
2020-11-19 18:14:00,351 DEBUG [439:StdOutHandler [{:type clojure.lang.ExceptionInfo
2020-11-19 18:14:00,351 DEBUG [439:StdOutHandler :message "snapshot exceeds maximum size"
2020-11-19 18:14:00,351 DEBUG [439:StdOutHandler :data {:message "snapshot exceeds maximum size", :max-snapshot-size 16777216, :actual-size 17245504}
2020-11-19 18:14:00,351 DEBUG [439:StdOutHandler :at [ginga.core$throwable invokeStatic "core.cljc" 331]}]
2020-11-19 18:14:00,351 DEBUG [439:StdOutHandler :trace
2020-11-19 18:14:00,351 DEBUG [439:StdOutHandler [[ginga.core$throwable invokeStatic "core.cljc" 331]
2020-11-19 18:14:00,351 DEBUG [439:StdOutHandler [ginga.core$throw_map invokeStatic "core.cljc" 336]
Cause
The snapshot of the page exceeds the limit set by the system. During an editing session, Confluence stores the recent state of the document being edited by creating a snapshot of it and then uses events that come after to reconstruct the state during the editing session. There's a constant called max-snapshot-size that acts as a guardrail to prevent a really large page, which can't be edited anyway, from consuming all of the memory allocated to Synchrony during the snapshot creation phase. When such a page is edited, Synchrony will throw a "snapshot exceeds maximum size" error, and editing will fail.
The constant is set to 16MB and cannot be modified.
Solution
Split the large page into smaller pages.
Was this helpful?