Xpages脱离服务器端缓存 [英] Xpages falling out of server side cache

查看:143
本文介绍了Xpages脱离服务器端缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题可能与特定的Domino版本有关(请参见下文),所以我从一些技术细节入手:

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

有问题的服务器是虚拟化的Windows 2008 R2 64位计算机. Domino版本是

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

IBM Domino(r)服务器(64位)(对于Windows/64,发布9.0.1FP4 HF70)

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

已安装最新的JVM安全补丁程序(9.0.1.4,日期为20150724).

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

我可能是错的,但是我认为在安装了最新的补丁程序( FP4 HF70 JVM )之后,问题就开始了:

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

在Xpage上,我有一个非常简单的"Refresh"类型按钮,仅触发围绕页面较大部分的xp:panel(id="pnMainContainer")的部分刷新.除其他组件外,在pnMainContainer内还有一个选项卡式面板.设置为在加载页面时使用三个选项卡中的第一个打开.

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.

假设我打开了第三个选项卡,通常如果我单击刷新"按钮,则选项卡#3保持打开状态,并且其内容按预期方式刷新.

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:警告:CLFAD #### W:状态数据不适用于/myPage 因为在缓存中找不到控制树.

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

我在这里知道此帖子: Xpages文档更改文档模式吗?,并且尽管我没有在应用程序中使用Xagents,但尝试将页面的viewState属性设置为nostate.这显然无助于解决问题.

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.

一个可能有用的细节是,相关页面利用了绑定到viewScope的ManagedBean.

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?

更新2015-09-10: 以下@Paul的建议,我将应用程序的会话超时设置为昨晚的120分钟(xsp.session.timeout=120).今天早上,我再次尝试:加载有问题的页面,然后将其放置在那里大约. 45分钟.在那之后,点击我的部分刷新按钮.结果:页面已重新加载到其初始状态,并且服务器控制台显示的警告与昨天相同.

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.

为了完整起见,这是我的应用程序xsp.properties的全部内容,

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:做了更多测试,发现以下细节:

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

  1. 使用上述xsp.properties缓存似乎在相当长一段时间内保持稳定,只要我让页面坐在那里
  2. 一旦我在页面或相关代码(SSJS库,托管bean或页面本身)中进行了某种调整,就需要重新构建缓存,因为我的页面状态会丢失(即使经过几次调整也是如此)秒).是否在Designer中打开自动构建"都没关系
  3. 尝试将页面持久性从xsp.persistence.mode=basic设置为xsp.persistence.mode=file.一旦打开选项卡#3,该选项卡将使用在viewScope级别注册的ManagedBean的内部属性,这会导致"java.io.NotSerializableException"
  4. 在同一服务器上仅用几个局部刷新按钮构建了一个非常简单的应用程序:结果是该测​​试应用程序的页面的页面状态永远不会丢失
  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?

推荐答案

viewState ="nostate"基本上意味着不要在服务器端为此页面存储组件树或作用域变量.这就是为什么您将其用于XAgent,而这些内容将永远不会被部分刷新.

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.

关键数据是: 1)XPages会话设置为超时的速度.一旦超时,您将丢失状态数据.我认为keepSessionAlive控件在这里没有帮助. 2)是否在浏览器中打开其他选项卡. XPages还有其他属性可以确定存储在内存/磁盘中的页面数.最大值存储在整个浏览器会话中,一旦达到最大值,最早的将从内存中删除,因此出现相同的消息(以及在XAgent上设置nostate的其他原因.

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.

听起来像是第一个原因.请注意,XPages会话超时和http超时是单独的超时.第一个是当当前会话的状态数据被删除并且是特定于应用程序的(因为每个XPages应用程序都有一个单独的运行时JVM)时,第二个是随后对浏览器的请求将提示进行身份验证.

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.

这篇关于Xpages脱离服务器端缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆