Issue when using too many Blueprints on Confluence 9

I am still struggling with creating pages based on blueprints with Confluence 9.

Now I get this error message:

confluence-1  | No status code found for exception, converting to internal server error :
confluence-1  |  -- url: /rest/api/content/blueprint/instance/16384010 | userName: admin | referer: http://localhost:8080/pages/resumedraft.action?draftId=16384010&draftShareId=b2b4477e-ea8e-4d5b-b47f-d44e64f4eccb& | traceId: 4367b22cb034284e
confluence-1  | com.opensymphony.module.propertyset.IllegalPropertyException: String exceeds 255 characters.                                                                                                                                                                                                                                                                                                                                                                    
confluence-1  |         at com.opensymphony.module.propertyset.AbstractPropertySet.setString(AbstractPropertySet.java:365)                                                                                                                                                                                                                                                                                                                                                      
confluence-1  |         at com.atlassian.confluence.user.DebugLoggingPropertySet.setString(DebugLoggingPropertySet.java:183)                                                                                                                                                                                                                                                                                                                                                    
confluence-1  |         at com.atlassian.confluence.impl.propertyset.ReadThroughCachingPropertySet.setString(ReadThroughCachingPropertySet.java:227)                                                                                                                                                                                                                                                                                                                            
confluence-1  |         at com.atlassian.core.user.preferences.UserPreferences.setString(UserPreferences.java:106)                                                                                                                                                                                                                                                                                                                                                              
confluence-1  |         at com.atlassian.confluence.user.ConfluenceUserPreferences.setPreference(ConfluenceUserPreferences.java:104)                                                                                                                                                                                                                                                                                                                                            
confluence-1  |         at com.atlassian.confluence.user.ConfluenceUserPreferences.setString(ConfluenceUserPreferences.java:84)
confluence-1  |         at com.atlassian.confluence.plugins.createcontent.extensions.DefaultUserBlueprintConfigManager.setBlueprintCreatedByUser(DefaultUserBlueprintConfigManager.java:98)                                                                                                                                                                                                                                                                                     
confluence-1  |         at com.atlassian.confluence.plugins.createcontent.impl.DefaultContentBlueprintService.decorateReturnedUrlWithFlashScopeInfo(DefaultContentBlueprintService.java:428)                                                                                                                                                                                                                                                                                    
confluence-1  |         at com.atlassian.confluence.plugins.createcontent.impl.DefaultContentBlueprintService.publishInstance(DefaultContentBlueprintService.java:210)                                                                                                                                                                                                                                                                                                          
...
confluence-1  |         at com.atlassian.confluence.plugins.restapi.resources.ContentBlueprintResource.publish(ContentBlueprintResource.java:111)                                                                                                                                                                                                                                                                                                                               
confluence-1  |         at com.atlassian.confluence.plugins.restapi.resources.ContentBlueprintResource.publishSharedDraft(ContentBlueprintResource.java:94)                                                                                                                                                                                                                                                                                                                     
...
...                                                                                                                                                                                                       
confluence-1  | Error occurred while getting the contributors: Could not find content with ID 16384010 and status draft
confluence-1  |  -- url: /json/startheartbeatactivity.action | userName: admin | action: startheartbeatactivity | referer: http://localhost:8080/pages/resumedraft.action?draftId=16384010&draftShareId=b2b4477e-ea8e-4d5b-b47f-d44e64f4eccb& | traceId: e895280aafd285d5
confluence-1  | Error occurred while getting the contributors: Could not find content with ID 16384010 and status draft
confluence-1  |  -- url: /json/startheartbeatactivity.action | userName: admin | action: startheartbeatactivity | referer: http://localhost:8080/pages/resumedraft.action?draftId=16384010&draftShareId=b2b4477e-ea8e-4d5b-b47f-d44e64f4eccb& | traceId: 5f17d296c19810ba

When I dig into the Confluence code then I find the location where the value of a property is checked to be shorter than or equal to 255 chars (com.opensymphony.module.propertyset.AbstractPropertySet).

  public void setString(String key, String value) {
    if (value != null && value.length() > 255) {
      throw new IllegalPropertyException("String exceeds 255 characters.");
    } else {
      this.set(5, key, value);
    }
  }

When I look up the call stack, I end up in com.atlassian.confluence.plugins.createcontent.extensions.DefaultUserBlueprintConfigManager at

  public void setBlueprintCreatedByUser(final UUID id, final ConfluenceUser user) {
        var userPreferences = getUserPreferences(user);
        String blueprintKeys = userPreferences.getString(CREATED_BLUEPRINT_KEYS).orElse(null);

        String idStr = id.toString();

        boolean modified = false;
        if (blueprintKeys == null) {
            blueprintKeys = idStr;
            modified = true;
        }
        if (!blueprintKeys.contains(idStr)) {
            blueprintKeys += ',' + idStr;
            modified = true;
        }
        if (modified) {
            try {
                userPreferences.setString(CREATED_BLUEPRINT_KEYS, blueprintKeys);
            } catch (ConfluenceUserPreferences.PreferenceException e) {
                log.warn("Unable to set createdBlueprints for user: {}", user);
            }
        }
    }

I do not fully understand why this code does this: It appends IDs of blueprints until there are too much of them to be stored in the user preferences where the length of the value is limited to 255 characters. So it must crash after a user uses about 7 blueprints.

Has anybody had this problem or does anyone know a link to documentation (for instance what is this CREATED_BLUEPRINT_KEYS and what could cause it to get out of bounds?) where I can find out what is wrong here?

EDIT: This issue is not related to our app. It seems that a single user should not use more than 6 Blueprints.

When I start Confluence in a fresh container and add pages from a couple of Confluence native blueprints, I will finally run into this issue:

The value has the identifiers of the blueprints I created pages from (
1a2978a0-c974-4e3f-93a0-1e3eb0bc0c9e,
d5489a45-6b01-44e1-8b84-87483a517da7,
f760b5fc-55c4-48f6-833d-7296468caf1b,
e878c974-9e00-4939-b14f-f224ca40049f,
1ef0a511-dade-42a4-a8ee-6c68b39ce17c,
6c72c674-a82d-416a-a5ea-70ef048a3534,
3210af5d-2c34-48cd-aac1-8d30ed9e1985") and this grows over 255 chars and this will prevent a page from being saved successfully.

We are using a lot of blueprints in our work. How can I solve this issue? Can somebody confirm this issue with Confluence 9.0.2?

Seems to be fixed in 9.0.3. Although I am unable to pinpoint the ticket that solves this issue in Issues resolved in 9.0.3 | Confluence Data Center 9.0 | Atlassian Documentation.