emacarron / old-google-code-issues

Automatically exported from code.google.com/p/mybatis
0 stars 0 forks source link

Probably is occurring a connection leak in MyBatis Migrations 3.1.1 #691

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the MyBatis are you using?
3.1.1.

Please describe the problem.  Unit tests are best!
My project has more than 650 migrations and it uses Oracle XE 10g Database. 
When I run "migrate up" I'm usually getting this error "ORA-12519, TNS:no 
appropriate service handler found".

This error normally occurs when Oracle has no more connection in connection 
pool or there's no more possibility to create new processes.

This error always happened to me when I was using a version prior to 3.0.6, 
after upgrading to the version 3.0.6 it doesn't happen anymore. But recently 
after upgrading to version 3.1.1 this same error came back to make me sad.

I think MyBatis Migrations is not closing connections properly (maybe on the 
right time) or really there's a kind of connection leak. Is Mybatis Migrations 
using an internal connection pool? 

What is the expected output? What do you see instead?
Not receive the error "ORA-12519, TNS:no appropriate service handler found".

Can you provide stack trace, logs, error messages that are displayed?
[java] ------------------------------------------------------------------------
[15:52:16][java] MyBatis Migrations FAILURE
[15:52:16][java] Total time: 11s
[15:52:16][java] Finished at: Tue Oct 09 15:52:16 BRT 2012
[15:52:16][java] Final Memory: 2M/118M
[15:52:16][java] 
------------------------------------------------------------------------
[15:52:16][java] 
[15:52:16][java] ERROR: Error executing command.  Cause: 
org.apache.ibatis.migration.MigrationException: Could not create SqlRunner. 
Cause: java.sql.SQLException: Listener refused the connection with the 
following error:
[15:52:16][java] ORA-12519, TNS:no appropriate service handler found
[15:52:16][java] The Connection descriptor used by the client was:
[15:52:16][java] 172.16.50.5:1521:XE

Please provide any additional information below.

Original issue reported on code.google.com by rpo...@gmail.com on 9 Oct 2012 at 7:44

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Could you check your system for evidences? Maybe a netstat will show the opened 
connections? or the dba may be able to confirm it?

Original comment by eduardo.macarron on 1 Nov 2012 at 8:30

GoogleCodeExporter commented 9 years ago
Hi Eduardo,

I didn't check any kind of evidences but only this error. The only solution I 
found was increasing the number of processes/connections on Oracle.

I'll try to analyse with netstat or another profiler tool as soon as possible. 
Unfortunately, we don't have a dba to help us.

Original comment by rpo...@gmail.com on 2 Nov 2012 at 2:48