Thanks crossdev - I will look into that link.
Meanwhile I read in one of the forums to set MaxActive to 0 and MaxIdle to -1
Not sure how this would help.
Any idea?
Thanks
Main Topics
Browse All TopicsDear Experts,
I run an ecommerce website and I'm doing load testing on the site to see what load it can handle. When I run the case 1000 users in 1 hour, the site breaks down and I start getting the error messages below in the log files.
What settings do I need to change to take care of this. This is the current setup for my DB: I'm using tomcats DBCP connection pool
Thanks
<Context reloadable="true">
<Resource name="jdbc/discountweb" auth="Container" type="javax.sql.DataSource
maxWait="1000" username="xxxxx" password="xxxxx" driverClassName="com.mysql
url="jdbc:mysql://localhos
</Context>
**************************
This is the error message:
ERROR 2009-01-15 15:35:56,201 [QuartzScheduler_DS-govaso
org.quartz.JobPersistenceE
at org.quartz.impl.jdbcjobsto
at org.quartz.impl.jdbcjobsto
at org.quartz.impl.jdbcjobsto
at org.quartz.impl.jdbcjobsto
* Nested Exception (Underlying Cause) ---------------
org.apache.tomcat.dbcp.dbc
at org.apache.tomcat.dbcp.dbc
at org.apache.tomcat.dbcp.dbc
at org.springframework.jdbc.d
at org.springframework.jdbc.d
at org.springframework.jdbc.d
at org.springframework.schedu
at org.quartz.utils.DBConnect
at org.quartz.impl.jdbcjobsto
at org.quartz.impl.jdbcjobsto
at org.quartz.impl.jdbcjobsto
at org.quartz.impl.jdbcjobsto
Caused by: java.util.NoSuchElementExc
at org.apache.tomcat.dbcp.poo
at org.apache.tomcat.dbcp.dbc
... 10 more
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Make sure that no one is storing the connections in a cache or static variable. I've seen this. Its ugly and defeats the pooling. All connections should be obtained, used and returned to the pool in the same method.
To anwser your followin question. The idea of pooling is that in part you have the ability to tune the pool. Rather than open the pool up to unlimited connections you would be better served to understand the application and its needs and tune it appropiately.
Thanks ali/crossdev
I am pretty sure that all connections are being released back to the pool. But are there any tools that I can use to track that say a user does a search operation on the site - basically be able to track that a connection has been taken from the pool - a search has been performed - and the connection being released back to the pool - some kind of a live monitoring system that we can run and play on the website and see - after which operations if any are there connections left open with out being released back.
Crossdev - These are the settings in mysql
max_connections = 250
wait_timeout = 172800
interactive_timeout = 172800
And these are my jdbc settings:
maxActive="200" maxIdle="20" maxWait="3000"
The load testing works fine when I test 100 users in 1 second all the way to 400 users in 200 secs.
But when I start testing 1000 users in 3600 seconds - I start getting the error message I posted in my question.
So what settings should I be changing to accommodate this test case.
Thanks
No I'm not - is there any tool I can use to monitor this? Basically I have outsourced testing and I was just provided with the results. The team is using JMeter to perform load testing and they are testing for various cases like 100 users in 1 second all the way to 1000 users in 3600 seconds.
But I dont think they are monitoring the database?
I wrote one, cause I could not find a good one. However, Its property of the company I work for.
You can get the value by doing a show status. http://dev.mysql.com/doc/r
How many app servers do you have hitting the database? If its 1:1 then the number of connections are ok. If this is the case you may have connections closing in the pool. If this is the case then you'll want to set the testOnReturn to true so that connections which get closed are reopenned.
See : http://commons.apache.org/
THanks crossdev,
Currently I have only 1 app server hitting 1 database - so we are good there.
About your suggestion of connections closing in the pool - why/when does that happen. If that was happening - wont it impact other test cases as well - like when I ran 100 users in 1 sec or 400 users in 200 secs - I did not get this error - it only starts happening for 1000 users in 3600 seconds.
But I will try that testOnReturn value and get back to you. It'll take me a couple of days to inform the company to make this change and rerun the test cases - but I'll definitely be back in 2 days :)
Thanks
Business Accounts
Answer for Membership
by: crossdevPosted on 2009-01-15 at 04:24:04ID: 23382613
you need to make sure that the max connections in MySQL match the availble in your pool connection. The default is 100. Do you have any other pools hitting the same database? If you have 2 servers each with 100 pool connections and a database that can only service 100 connections you'll have this problem.
g/external /freeware/ mysqlTunin g.html
Here is a link on tunning http://www-css.fnal.gov/ds