Link to home
Start Free TrialLog in
Avatar of novarse
novarse

asked on

How can I limit the number of concurrent user of my JSF2 web app?

I have an online application form. When the concurrent number of users rose to over 260 there were reports of some people seeing other peoples data in place of their own on certain pages.
The don't know why this is happening so I thought a short term solution was to limit the number of users to 200. Is there any way this can be done?
The application is a JSF2 Java EE 7.0, running on Glassfish 4.0, Apache, 30GB Ram, fast CPU on a 64bit Debian server.
Thanks
Avatar of mpagnan
mpagnan
Flag of Canada image

You can set maxclients in Apache with the maxclients directive. The instructions are here: http://httpd.apache.org/docs/2.0/mod/mpm_common.html
Avatar of girionis
JSF is just an API, not a server. You have to limit the number of concurrent users in the server. Have a look either at APache's or Glassfish;s documentation.
Yes. That is the answer I gave in the previous post. Use Apache's maxclients directive. It is not a tough thing to program if you have access to the server programming.
Avatar of novarse
novarse

ASKER

Hi guys, thanks for the replies. What is the user experience of reducing this maxclients value? And what values should this be set to?
You can set it to whatever is needed. Remember that all web apps running on that server will be affected. I see it as a stop gap measure. Your problem, as I read it, is to find why your system cannot handle more than 200 concurrent users.
Hi guys, thanks for the replies. What is the user experience of reducing this maxclients value? And what values should this be set to?

There is no specific answer to this. You have to measure the requests, or the expected growth of the requests, and decide what is the preferred number of concurrent threads.  If you see that this number is getting too high then you should consider adding more server power, instead of limiting the concurrent users (except, of course, if you don't mind to delay your clients' requests).
ASKER CERTIFIED SOLUTION
Avatar of novarse
novarse

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I guess you googled for that. But, if you had searched this site, then you would have found similar examples. Such as the following.  

https://www.experts-exchange.com/questions/24531899/How-can-I-limit-the-amount-of-sessions-that-may-be-created-using-tomcat-5.html
Avatar of novarse

ASKER

Yes, you are right. I did search this site as well but may be I overlooked this as I don't use TomCat.
Ta