1
votes

I have an xpages aplication with 40 xpages, 60 custom controls and with cca. 50 java files(used in src ... package explorer) To speed up application load I have used these two variables in notes.ini

XPagesPreload=1 
XPagesPreloadDB=account/w-apps.nsf 
(I use the latest 853FP1)

In the log I can see, that these vars are being used but despite this I alway have to wait cca 7 seconds for the first page being displayed(next time is fast). And when I don't use the application e.g. for hour its seems to me its being unloaded and then I have to wait once again. At the end, when you use application once in hour, you alway have to wait some time what is annoying. Is there a way how to speedup / overcome these things or at least to avoid the application unload?

3

3 Answers

2
votes

This is a common issue with xPages. After a time period the server unloads your application to free up memory for other applications. The setting your are searching for is :

xsp.application.timeout

in the xsp.properties file in your nsf / server. If you change this number it would take longer to time out your server but be aware:

It also means that memory is not cleared for sessions which could cause a outofmemory error.

If your application takes 7 seconds to load there is a lot going on on the background. I think it is wise to first see if you can optimize your architecture, optimize the memory settings on the server ( jvm heapsize ) and see if the specs of your server are maybe the bottleneck..

2
votes

You could keep session times modest, but use a scheduled agent that simply does a @URLOpen on one page that can be accessed as anonymous. This prevents the application from timing out. To do that set Anonymous to "no access" but check "read public document" and then check one page as "available to public access users". The page shouldn't do anything, just send back "OK - I got it" --- but keeps the application context alive.

If you schedule the agent to run from 08:00 - 18:00 your app is up during normal working hours

1
votes

XPagesPreload setting is weird and totally useless in my opinion. It will preload them only in the rare event of booting HTTP task or the server. If the XPage is not accessed for 2.5 hours it will be unloaded. I noticed this 2.5 hours when testing with 8.5.2. In Domino 9 I just know that they are unloaded after a few hours, probably it's still 2.5 hours.

I had a much bigger problem than 7 seconds loading time. It was 1-3 minutes the first time certain XPages were loaded. David Leedy also mentions similar loading times.

After some testing I found out that the slowness is caused by a View Panel where documents are fetched using full-text search and sorted (not sure if sorting is relevant). This causes the very long initial loading time when the view index is large. After the first time the page loads in 1-3 seconds with different full-text searches. Our view index was almost 0.7GB because of 12 columns sortable to both ways (customer requirement). The slowness was between beforeRenderResponse and afterRenderResponse events.

I doubted that the customer would use all these 24 sort indexes so I checked the "Defer index creation until first use" option in each column. Then I discarded the view index and it has stayed small so far and the first load in the morning is a few seconds now.