Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jdbc pool keepalive flooding #3294

Closed
asfimport opened this issue Jan 8, 2014 · 6 comments
Closed

Jdbc pool keepalive flooding #3294

asfimport opened this issue Jan 8, 2014 · 6 comments

Comments

@asfimport
Copy link
Collaborator

Luca (Bug 55977):
In jdbc load test Keepalive age is not respected with bundled excalibur libraries. Versions tried: 2.9, 2.11, trunk.

For example, consider this configuration:

  • keepalive: true
  • Max Connection age: 5000
  • Validation query: select 1 from dual

Insert in a thread group a jdbc sampler and a timer to execute 1 sample per second.

Enabled debug in jmeter properties:
log_level.jmeter.protocol.jdbc=DEBUG

In the output in jmeter.log, after "Max connection age" seconds it seems that the flag which marks the connection idle is not reset, and for every following sample a keepalive query is executed:
2014/01/08 10:56:20 DEBUG - jmeter.protocol.jdbc.sampler.JDBCSampler: sampling jdbc
2014/01/08 10:56:20 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Got a com.sun.proxy.$Proxy0 from the pool.
2014/01/08 10:56:20 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Pinging database after 5999ms of inactivity.
2014/01/08 10:56:20 DEBUG - jmeter.protocol.jdbc.AbstractJDBCTestElement: executing jdbc
2014/01/08 10:56:20 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Put a com.sun.proxy.$Proxy0 back into the pool.
2014/01/08 10:56:21 DEBUG - jmeter.protocol.jdbc.sampler.JDBCSampler: sampling jdbc
2014/01/08 10:56:21 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Got a com.sun.proxy.$Proxy0 from the pool.
2014/01/08 10:56:21 DEBUG - jmeter.protocol.jdbc.config.DataSourceElement: Pinging database after 6999ms of inactivity.
2014/01/08 10:56:21 DEBUG - jmeter.protocol.jdbc.AbstractJDBCTestElement: executing jdbc

In attach the whole log.

Under heavy load the Oracle DB is flooded by keepalive queries that cause unexpected cpu utilization and latencies (even with dual table).

I tried the latest jars from excalibur (datasource and pool) and the problem seem to me that is solved:

  • excalibur-datasource-1.2.0.jar
  • excalibur-pool-api-2.1.jar
  • excalibur-pool-impl-2.1.jar
  • excalibur-pool-instrumented-2.1.jar

Hope this helps to solve the problem, thanks.

Luca

Created attachment jmeter.log: Jmeter log of the scenario.

Severity: normal
OS: All

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
(In reply to Luca from comment 0)

...
Under heavy load the Oracle DB is flooded by keepalive queries that cause
unexpected cpu utilization and latencies (even with dual table).

I tried the latest jars from excalibur (datasource and pool) and the problem
seem to me that is solved:

  • excalibur-datasource-1.2.0.jar

Did you try datasource 2.1 ?

  • excalibur-pool-api-2.1.jar

I don't think you need the api jar.

  • excalibur-pool-impl-2.1.jar
  • excalibur-pool-instrumented-2.1.jar

We currently use the following:

excalibur-datasource.version = 1.1.1
excalibur-instrument.version = 1.0
excalibur-logger.version = 1.1
excalibur-pool.version = 1.2

Which of these did you keep?

Hope this helps to solve the problem, thanks.

Thanks very much, useful to know.

Luca

@asfimport
Copy link
Collaborator Author

Luca (migrated from Bugzilla):

Did you try datasource 2.1 ?

I tried it now and seems working.

> - excalibur-pool-api-2.1.jar

I don't think you need the api jar.

Without the jar I get this exception:

2014/01/08 15:22:16 ERROR - jmeter.JMeter: Uncaught exception: java.lang.NoClassDefFoundError: org/apache/avalon/excalibur/pool/ObjectFactory
at org.apache.jmeter.protocol.jdbc.config.DataSourceElement.initPool(DataSourceElement.java:162)
[...]

We currently use the following:

excalibur-datasource.version = 1.1.1
excalibur-instrument.version = 1.0
excalibur-logger.version = 1.1
excalibur-pool.version = 1.2

Which of these did you keep?

Here is the list of excalibur jars that I'm using:

excalibur-instrument-1.0.jar
excalibur-logger-1.1.jar
excalibur-datasource-2.1.jar
excalibur-pool-api-2.1.jar
excalibur-pool-impl-2.1.jar
excalibur-pool-instrumented-2.1.jar

Thanks,
Luca

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
(In reply to Luca from comment 2)

> Did you try datasource 2.1 ?

I tried it now and seems working.

Great

>
> > - excalibur-pool-api-2.1.jar
>
> I don't think you need the api jar.

Without the jar I get this exception:

2014/01/08 15:22:16 ERROR - jmeter.JMeter: Uncaught exception:
java.lang.NoClassDefFoundError:
org/apache/avalon/excalibur/pool/ObjectFactory
at
org.apache.jmeter.protocol.jdbc.config.DataSourceElement.
initPool(DataSourceElement.java:162)
[...]

My bad, I assumed the API contained empty classes.

> We currently use the following:
>
> excalibur-datasource.version = 1.1.1
> excalibur-instrument.version = 1.0
> excalibur-logger.version = 1.1
> excalibur-pool.version = 1.2
>
> Which of these did you keep?

Here is the list of excalibur jars that I'm using:

excalibur-instrument-1.0.jar
excalibur-logger-1.1.jar
excalibur-datasource-2.1.jar
excalibur-pool-api-2.1.jar
excalibur-pool-impl-2.1.jar
excalibur-pool-instrumented-2.1.jar

Thanks,

Thanks again!

@asfimport
Copy link
Collaborator Author

@pmouawad (migrated from Bugzilla):
It might be the opportunity to switch to Tomcat pool .

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
(In reply to Philippe Mouawad from comment 4)

It might be the opportunity to switch to Tomcat pool .

Please create a new thread on the dev list about this.

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
Fixed:

URL: http://svn.apache.org/r1556884
Log:
Jdbc pool keepalive flooding - update Excalibur versions
#3294

Modified:
jmeter/trunk/build.properties
jmeter/trunk/build.xml
jmeter/trunk/eclipse.classpath
jmeter/trunk/lib/ (props changed)
jmeter/trunk/res/maven/ApacheJMeter_parent.pom

URL: http://svn.apache.org/r1556889
Log:
Jdbc pool keepalive flooding
#3294

Modified:
jmeter/trunk/xdocs/changes.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant