I am meeting with a recurring error on my XWiki instance (Stable version, running with XJetty) when trying to preview or edit pages.
The error displayed in the logs is: ISPN029018: The serialized form of key [...] is too long (5158); with maxNodeSize=4096 bytes you can use only keys serialized to at most 4067 bytes.
If you need the full content of the error message, I pasted it here (valid 1 month) ZeroBin.net
It seems that the cache key generated during the preview process includes the entire content of the page and various metadata (like style.less.vm, color themes, etc.), which exceeds a default 4096 bytes limit of Infinispan.
Context:
Environment: Standalone server (no clustering).
Servlet Container: Jetty (XJetty distribution).
Symptoms: Error message appearing randomly in a red box at the top of the editor and at the beginning of the content when returning from preview back to edition mode.
I have tried searching the forum, the web, and asking an IA (Perplexity) to search the web too. Nothing really useful came out.
The error indicates that some code compiles the style.less.vm LESS file as part of the edit/preview request with full context for the cache key. Normally, this file should be cached without context - we call it through colorThemeInit.vm in stylesheets.vm but the cache for the color theme that is triggered there doesn’t use the context. Do you have any customizations or extensions that compile LESS files as part of the main request (i.e., not as a resource that is loaded separately), e.g., using $services.lesscss.compileSkinFile? This should also cause performance problems as it means that the file would be frequently re-compiled.
Where exactly does the error appear in the HTML output, maybe that provides some hints where it comes from?
We can and probably should improve the less cache to, e.g., use a hash of the request to prevent this problem but in your case I think there is another problem that should be fixed.
Hello,
I have not done anything related to CSS. The full error message appears in both places : the top of the editor field, and above the editor field.
This said, I have noticed a new version of XWiki is now available, (stable branch). (Could it contribute to fixing this issue once applied?)
What have I done specifically ? Just a macro related to languages, I don’t think it would interfered, would it?
Just saying… This is the code used:
It would, because it contains important security fixes, but I doubt it would change anything regarding this issue.
I’m asking about the exact position in the HTML output as it might provide some hints which code triggers it. The code you mentioned doesn’t look like a likely candidate.
I have not done a search in the source code that would allow me to answer your question.
The message still has to appear again for me to do so : if it is even possible ?
Because as soon as I am again in the editor, the full error message appears at same time at the top of the editor and also above.
In this case how can I pinpoint where it appears in the HTML?
Also I does not occur each time, so I’ll have to wait for the next time it is triggered in order to be able to answer more precisely if that is even possible?
Please, tell me more about how I can answer your question the right way?