0

I am using primefaces 6.0/myfaces for my web application development.We have requirement where concurrent 3000 users will be using our application.I just want to know for 3000 users what should be the param-value? what all factors should i consider? i have experienced if i reduce the number count i am getting viewExpiredException. we have this configuration in our web.xml

<context-param>
        <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
        <param-value>128</param-value>
    </context-param>

``

Raj
  • 559
  • 1
  • 4
  • 4

1 Answers1

0

Those 3000 users will have 3000 different sessions, so this setting isn't relevant here in that sense.

If you have an AJAXical application then basically one open page = one view. Do you really expect your users to have up to 128 open pages at a time?

You should actually lower this setting if you're expecting many users, otherwise you risk running out of memory because you're keeping too many views. Views have 2 ways to expire: when the queue is full and a new view gets added, or when a session dies. With a queue that big, all your views will be held in memory as long as a session is alive. Even if a user closed the page long ago, its view will continue to live on and hog memory.

All this depends on many factors: how memory heavy are your views, how much memory do you have on the server, what are browsing habits of typical user, what is the session timeout... Maybe you can switch to client state saving. Maybe you should look into clustering and load balancing instead.

Vsevolod Golovanov
  • 4,068
  • 3
  • 31
  • 65
  • one page=one view? If i set param-value=8 on the same page if i click 8 times i am getting viewExpiredException. – Raj May 11 '17 at 04:32
  • @Raj, then you're probably not using AJAX. Every non-AJAX POST will create a new view, just like every GET. See http://stackoverflow.com/a/16050424/1341535 . – Vsevolod Golovanov May 11 '17 at 08:16
  • Thank you so much for your answer!! – Raj May 12 '17 at 08:58