Hi there :)
We have a lot of PROD logs "JSF1095: The response was already committed by the time we tried to set the outgoing cookie for the flash. Any values stored to the flash will not be available on the next request."
We started by incrementing the related parameter
glassfish/domains/datainra/applications/dataverse-5.14/WEB-INF/classes/META-INF/microprofile-config.properties:69:dataverse.jsf.buffer-size=350000
which reduce the number of logs but do not fix it completely.
I looked a bit deeper and the documentation says : By default the value is 1024 A reasonable default such as "1024" should be specified
And dataverse default is way higher with 102400
<context-param>
<param-name>jakarta.faces.FACELETS_BUFFER_SIZE</param-name>
<!-- Uses Microprofile Config to replace at runtime. Not standardized, Payara App Server specific. -->
<param-value>${MPCONFIG=dataverse.jsf.buffer-size:102400}</param-value>
</context-param>
I start to think that increasing it to more than 350000 is not the way to go. I would like your view on this :)
@Oliver Bertuch
Can you give a little more log output for those? There should be a line indicating where this happens
Also the way you set these numbers is very weird with editing the deployed file. I suggest you use a system property or other, easier MPCONFIG methods to get that number in
[2024-06-27T17:12:25.789+0200] [Payara 5.2022.4] [WARNING] [jsf.externalcontext.flash.response.already.committed] [javax.enterprise.resource.webcontainer.jsf.flash] [tid: _ThreadID=15325 _ThreadName=http-thread-pool::jk-connector(227)] [timeMillis: 1719501145789] [levelValue: 900] [[
JSF1095: The response was already committed by the time we tried to set the outgoing cookie for the flash. Any values stored to the flash will not be available on the next request.]]
I don't really see a relation with a page or action in logs
Oh you're still on an older release of Dataverse... May I suggest you upgrade to v6.x first? We changed to Jakarta EE 10 and Jakarta Faces / Mojarra received a major overhaul. Also, any upstream issues will ask for recent tech anyway.
This is what I do, I have a microprofile-config.properties with dataverse.jsf.buffer-size=350000
Or I misunderstood
I have this issue on v6.0 also (currenly in upgrade process)
You should not edit that file. It is solely used to ship defaults with the application.
Are you saying that we can specify a path for our microprofile-config.properties ?
No
None of that
Also, web.xml is too early in the deployment lifecycle
I very much doubt adding this option to the microprofile-config.properties file changes the value. It will probably still be on the default setting
That is what documentation suggest no ? https://guides.dataverse.org/en/5.14/developers/debugging.html
It does not suggest you edit that file :wink:
Some JSF options can be easily changed via MicroProfile Config (using environment variables, system properties, etc.)
If you are on a classic installation, I highly recommend using a system property
If you're using containers, an env var is usually simpler
This topic was moved here from #dev > JSF1095 jakarta.faces.FACELETS_BUFFER_SIZE by Oliver Bertuch.
Hum, we understood that it was recommended to start using MP so we did by modifying glassfish/domains/datainra/applications/dataverse-5.14/WEB-INF/classes/META-INF/microprofile-config.properties and as it is a MP Key we thought it would work ^^
A message was moved here from #dev > JSF1095 jakarta.faces.FACELETS_BUFFER_SIZE by Oliver Bertuch.
This has never been officially recommended or been mentioned in the guides. IIRC this goes back to a misunderstanding of a few dataverse-docker users.
What you are doing there is editing the deployment files. A new deployment of a new WAR would potentially overwrite it. It's not meant to be an admin editable file.
We should probably include a big fat warning that this file is not meant to abused in this way
Hum, I think we needed something that is was only on MP Key while upgrading to v5.14...
Oliver Bertuch said:
What you are doing there is editing the deployment files. A new deployment of a new WAR would potentially overwrite it. It's not meant to be an admin editable file.
you are right!
this can be an issue while deploying, you are right
We will work on this.
Anyhow, what do you think about this buffer size ?:)
Well so far you didn't actually enlarge it beyond the default of 102400 bytes...
ah!
From what I find about this error on SO etc, increasing the buffer helped
So I suggest you try increasing it again, but with a system property or other valid MPCONFIG source
Okay :)
I wouldn't jump to the 350000 in one go, maybe double it first and then go smaller until it resurfaces
I'll update the topic when tested.
This one here is particularly interesting: https://stackoverflow.com/a/45284797
Don't you think 102400 is so far from the default 1024 ?
The size is given in bytes and should be larger than your biggest page
I'm not sure we ever had another look at that... :see_no_evil:
our biggest html page fastly found was around that 350000
Interesting!
I crawled the same SO as you :D
I see that the default we provide has been around for quite some time. https://github.com/IQSS/dataverse/commit/5f99037e5df918cf5f653c61971b5a701d690e58
v4.17 damn I was not working with Dataverse at this time XD
I'd be cautious with that number though - is fastly only counting the HTML or also JS and images?
html response which contains some JS/CSS (settings of Dataverse like footer/GA/custom CSS..)
And that HTML is 341 KiB? Fat chance! Did fastly say which page that is?
I'll check fastly XD
I mean that probably is like 175k characters (assuming all chars are UTF-8 2byte encoding). That's ~88 DIN A4 pages of text.
wget https://entrepot.recherche.data.gouv.fr/dataset.xhtml?persistentId=doi:10.57745/1G5UQP -O dataset.html
--2024-06-27 18:17:34-- https://entrepot.recherche.data.gouv.fr/dataset.xhtml?persistentId=doi:10.57745/1G5UQP
Resolving entrepot.recherche.data.gouv.fr (entrepot.recherche.data.gouv.fr)... 147.100.174.24
Connecting to entrepot.recherche.data.gouv.fr (entrepot.recherche.data.gouv.fr)|147.100.174.24|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘dataset.html’
dataset.html [ <=> ] 176,58K --.-KB/s in 0,1s
2024-06-27 18:17:35 (1,42 MB/s) - ‘dataset.html’ saved [180817]
180k with a random dataset
OK the pure HTML is ~180 KiB
wget https://entrepot.recherche.data.gouv.fr/dataset.xhtml?persistentId=doi:10.57745/SSA1VM -O dataset.html
‘dataset.html’ saved [249153]
I see that there are tons of Javascript etc embedded
Yes but this is default Dataverse settings
This will obviously all go away with the new SPA
yes
Maybe I should sniff our reposity ^^
SPA is far away from our production XD
Really just the defaults? No viewers / vocab stuff going on?
The Matomo tracking is already huge
I'm thinking about :
It probably would be a good idea to make the CSS and Javascript embedding stuff go away
:CVocConf is not enabled yet...
All of this does a huge number on the performance, as it needs to be sent everytime, while it can be cached as separate files
100% agree
it should be as CDN ressources
That wouldn't even be necessary
Just make it separated things
"as"
That way the JSF buffer wouldn't need to be so huge
yes, just static apache is enough
All of that processing is crazy
You could even just let Payara hand it out
yeah
If you want, feel free to create an issue. A PR would probably be welcome. As you say - the SPA is still a long way to go.
I don't know if it's easy to move, but it would also increase the page speed
It shouldn't be too hard to implement
But someone has to sit down and do it :see_no_evil:
maybe just using :FooterCustomizationFile to call the required linked ressources could be an idea
BTW all of this script and style stuff is also very bad for SEO
I know :)
this is why I mentionned CDN
Yeah. Still not necessary / easy to achieve once all of this stuff goes into separate files and you include those. Where those files are isn't that important...
footer is better for page speed
still need to be tested
G2G, I'll update after tests ;) thanks @Oliver Bertuch for your time
The whole customization stuff should be refactored to enable inclusion of <link> and <script> elements
Yes.
And then enable serving content as files (so the existing properties are still usable in a backward compatible way)
That way you can actually start to serve the static content from some place else, or, if you don't want/need that kind of advanced setup, go for the all in one
Again, feel free to help with creating descriptive issues and solving PRs :smiley:
C U :wave:
See you
Oliver Bertuch said:
Again, feel free to help with creating descriptive issues and solving PRs :smiley:
ofc
Last updated: Oct 30 2025 at 06:21 UTC