0

I have a web application developed in Java/Java EE connecting to a warehouse at the back end. We have IBM WAS as the application server and there is a data source defined in it for database connections. The connection pool has is set to a maximum pool size of 30. There are several times when the DB queries can take upto 1-2 minutes and hence user waits at the front end.

What will happen in a scenario when 40 different concurrent users access a screen that is running a query at the back end taking 1-2 minutes.

  1. As per the WAS setting, there can be a maximum of 30 connections to DB, right?
  2. WAS will wait until a DB connection finishes processing and returns the connection to pool; so it can be assigned to next request in queue?
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Allzhere
  • 1,280
  • 1
  • 11
  • 19

2 Answers2

0

Unfortunately I can not answer how WebSphere works in this situation but you can try emulate your query with delay functions of DB:

TSQL:

--wait for 1 minute
WAITFOR DELAY '00:01'

Oracle:

DBMS_LOCK.sleep(seconds => TIME_);

and so on.

Then you may use apache jmeter(http://jmeter.apache.org/) to emulate user requests. There are various requests, listeners and so on.

Websphere admin console has section Monitor and Tuning where you can configure your own monitor for data sources and http request pool activity.

This way we debugged bottlenecks of our application.

0

In your situation result will be: 30 connection will be in processing state other 10 will be in waiting state. If one of processing connection returs into datasource then one of waiting connection will start his work.

Anton N
  • 2,317
  • 24
  • 28
  • thanks for your inputs. A follow up question on this regarding the public websites that interact with DB. In order to process such heavy concurrent load, either they have a huge connection pool along with very short lived transactions,right ?? – Allzhere Sep 27 '13 at 07:35
  • Sometimes It's useful to redesine database schema or watch carefully database queries. Huge connection pool it's not evil. All depends on your server load. – Anton N Sep 27 '13 at 10:58