Xpages falling out of server side cache

孤街浪徒 提交于 2019-12-11 10:46:18

问题


This issue may have to do with a very specific Domino version (see below), so I start with a few technical details:

Server in question is a virtualized Windows 2008 R2 64bit machine. Domino release is

IBM Domino (r) Server (64 Bit) (Release 9.0.1FP4 HF70 for Windows/64)

The latest JVM security patch (9.0.1.4 dated 20150724) is installed.

I may be wrong but I feel that the issue started after we installed the latest patches (FP4 HF70 and JVM):

On an Xpage I have a very simple "Refresh" type button just triggering a partial refresh on an xp:panel (id="pnMainContainer") surrounding the bigger part of my page. Amongst other components there is a tabbed panel inside pnMainContainer. This is set to open with the first of three tabs upon loading the page.

Assuming that I have the third tab open, usually if I click the Refresh button tab #3 stays open, and its contents are freshed as expected.

Sometimes however, after I left the page open for a several minutes (can't really say how long, maybe somewhere around half an hour), the refresh obviously is returning to its initial state, showing the first tab instead of the one that was open before, and emptying all editable fields that were filled before.

When that happens I see the following warning appear on the console:

HTTP JVM: WARNING: CLFAD####W: State data not available for /myPage because no control tree was found in the cache.

I am aware of this post here: Xpages document changing document mode?, and although I don't use Xagents in my application I tried setting my page's viewState property to nostate. This apparently didn't help solve the problem.

One more detail that might be helpful is the fact that the page in question makes use of a managedBean bound to the viewScope.

Any ideas what could be causing this, and - moreover - how to change this behaviour?

Update 2015-09-10: following @Paul's suggestions below I set my application's session timeout to 120 minutes last night (xsp.session.timeout=120). This morning I tried again: loaded the page in question then let it sit there for approx. 45 minutes. After that time hit my partial refresh button. Result: page is reloaded to its initial state, and server console is showing the same warning as yesterday.

For completeness sake here's the entire contant of my application's xsp.properties as it is at the moment:

xsp.error.page.default=true
xsp.library.depends=com.ibm.xsp.extlib.library
xsp.resources.aggregate=true
xsp.theme=oneuiv3.0.2
xsp.session.timeout=120
xsp.application.timeout=120
xsp.persistence.mode=basic

Is there probably something in there that would be causing this behaviour?

Some more details: did some more testing and found the following details:

  1. with the above mentioned xsp.properties caching appears to be stable for quite a while as long as I let the pages just sit there
  2. as soon as I make any kind of adjustments somewehere on my page or in related codes (SSJS libs, managed beans, or the page itself) cache needs to be rebuilt as the state of my page is lost (even after a few seconds). It doesn't matter at all whether "Build automatically" is turned on in Designer or not
  3. Tried setting page persistence from xsp.persistence.mode=basic to xsp.persistence.mode=file. This results in a "java.io.NotSerializableException" as soon as I open tab #3 which makes use of internal properties of a managedBean that is registered at a viewScope level
  4. Built a very simple app on the same server with just a few partial refesh buttons: result is that page state is never lost for pages from this test application

As long as the cache is lost only when I update design I don't really care. But I'm afraid that this might escalate if many users are starting to access the pages.

Anything else I could do to improve performance?


回答1:


viewState="nostate" basically means don't store the component tree or scoped variables for this page server-side. That's why you use it for XAgents, which will never be partially refreshed.

The key data is: 1) How quickly the XPages session is set to timeout. Once that times out, you'll lose state data. I don't think keepSessionAlive control helps here. 2) Whether other tabs are being opened in the browser. There are other XPages properties that determine the number of pages stored in memory / disk. The maximum is stored for the whole browser session and, once you hit the maximum, the earliest is dropped from memory, hence the same message (and the other reason for setting nostate on XAgents.

It sounds like the first is the cause. Note that XPages session timeout and http timeout are separate timeouts. The first is when the state data for the current session is removed and is application-specific (because each XPages app has a separate runtime JVM), the second when a subsequent request to the browser will prompt for authentication.



来源:https://stackoverflow.com/questions/32482575/xpages-falling-out-of-server-side-cache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!