Re: [jboss-user] [Performance Tuning] - Configuration of Datasource: min-pool-size and max-pool-size
by Peter Johnson
Peter Johnson [http://community.jboss.org/people/peterj] replied to the discussion
"Configuration of Datasource: min-pool-size and max-pool-size"
To view the discussion, visit: http://community.jboss.org/message/555457#555457
--------------------------------------------------------------
What percentage of the requests made by a user require a database connection?
How many database connections does a typical request require?
Typically, how many simultaneous requests are made?
Once you answer those questions, then you will know how many connections to provide. For example, if only 50% of the requests require a single connection, and usually there are only 5 requests being simultaneously processed, then 3 connections is sufficient.
Another way to do this is to test it. Run with max connectiosn set to a large number of connections,say 100, and min connections set low, say 2 connections. Then monitor the number of active connections over the course of a day. That should tell you how many you need.
You should also monitor the number of queued connection requests. Let's say you used the first example and set max connections to 3. Yet you notive that quite often you have as many as 4 queued connection reqeusts, then you should increase the max connections to 7.
Another thing to consider is that you can always set max connection to a high number, say 100, and set min connections to your typical usage, say 7 to keep with the prior example. You will only ever have more than 7 connections if you actually need them.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/555457#555457]
Start a new discussion in Performance Tuning at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months
Re: [jboss-user] [jBPM] - How to handle failed processes/states due to server crashes?
by Michael Wohlfart
Michael Wohlfart [http://community.jboss.org/people/mwohlf] replied to the discussion
"How to handle failed processes/states due to server crashes?"
To view the discussion, visit: http://community.jboss.org/message/555442#555442
--------------------------------------------------------------
Hi,
> 1. Failed process states due to any server crash. How can I restart the processes from the point where they failed?
>
The processes are executed within a database transaction until they reach some kind of wait state where they need input (signals) in order to continuethis state is persisted to database, I don't see any reason for restarting a process here.
> 2. How will transaction be rolled back once my application is up again?
That's the job of the database as far as i understand.
> 3. How shall I do Exception Handling? May be Custom node? I know this has been asked in other threads too, but I asking it here also because: a) since I am new to jBPM I am not able to understand it, may be a sample example would do. b) I feel exception handling needs to be taken care in such a application where we are interacting with jms & other external services.
That's the job of the user code, you have to deal with your own Exceptions, there is no special Exception Handling besides some obvious stuff like rollback of the ongoing transaction. And then there is some retry code for failed async Job execution and a Retry interceptor for stale hibernate entities.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/555442#555442]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months