1

I have a couple of questions

1) How can we define in weblogic configuration how many concurrent users are allowed or can be allowed at a time to a particular application?

2) how can we tell how may threads are being used in a weblogic at a time?

3) How many max jdbc connections should I set so that users are not blocked due to all connections used up. How to keep a balance between number of concurrent user/threads allowed to jdbc connections max?

Thanks

user665319
  • 1,419
  • 3
  • 14
  • 13

4 Answers4

1

It is different in each use case scenario. But usually WLS 1 instance can cover 50~100 active user per instance. The instance has 2 CPU and 1~1.5GB heap.

This document will be useful to your question:

"Planning Number Of Instance And Thread In Web Application Server"

Kijewski
  • 25,517
  • 12
  • 101
  • 143
Terry Cho
  • 608
  • 6
  • 14
0

As far as i know you have to control these kind of things in

weblogic-xml-jar.xml or weblogic.xml

if you look for weblogic-xml-jar.xml commands you can find your desire .

khashayar
  • 19
  • 8
0

1) You can user Work Managers to do this for managing requests. However, restricting the number of concurrent users will vary application to application. If it is a web app, use the work managers with a max constraint equal to the number of users you want to restrict it to. However, be sure you figure out how to handle overflow - what will you do when you get 100 requests but have a 5-user restriction? Is this synchronous or asynchronous processing?

2) Ideally you would want a 1:1 ratio of threads to connections in the pool. This guarantees that no thread (User Request) is waiting for a connection. I would suggest trying this. You can monitor the JDBC connection pools using the WebLogic console and adding fields to the columns under the 'Monitoring' tab for the connection. If you have a high number of waiters, and/or a high wait time then you would want to increase the number of connections in the pool. You could start with a 1:0.75 ratio of threads:connections, do performance/load testing and adjust based on your findings. It really depends on how well you manage the connections. Do you release the connection immediately after you get the data from the database, or do you proceed with application logic and release the connection at the end of the method/logic? If you hold the connection for a long time you will likely need closer to a 1:1 ratio.

Jeff West
  • 1,563
  • 9
  • 11
0

1) If to each user you assign a session, then you can control the max number of sessions in your webapp weblogic descriptor, for example adding the following constraint :

<session-descriptor>  <max-in-memory-sessions>12</max-in-memory-sessions> </session-descriptor>

It's more effective (if you mean 1 user = 1session) than limiting the number of requests by work managers. Another way, when you can't predict the size of sessions and the number of users, is to adjust memory overloading parameters and set :

weblogic.management.configuration.WebAppContainerMBean.OverloadProtectionEnabled.

More info here : http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webapp/sessions.html#wp150466

2) Capacity of threads is managed by WebLogic through work managers. By default, just one exists : default with unllimited number of threads (!!!).

3) Usually, adapting the number of JDBC connections to the number of threads is the more effective.

The following page could surely be of great interest : http://download.oracle.com/docs/cd/E11035_01/wls100/config_wls/overload.html

JLM
  • 559
  • 6
  • 11