Link to home
Start Free TrialLog in
Avatar of gbcbr
gbcbrFlag for Cyprus

asked on

ORA-12519

Please advice, last week I have this problem with DB connection. It's appear after 30-50 minutes of normal work and  solved only by restarting DB.
Please advice.
14.06.2011 17:45:30 connect.SelectData run
SEVERE: null
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
 
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412)
	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
	at java.sql.DriverManager.getConnection(DriverManager.java:582)
	at java.sql.DriverManager.getConnection(DriverManager.java:185)
	at connect.LionFXConnect.select(LionFXConnect.java:45)
	at connect.SelectData.run(SelectData.java:54)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
 
	at oracle.net.ns.NSProtocol.connect(NSProtocol.java:385)
	at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301)
	... 10 more

Open in new window

Avatar of Sean Stuber
Sean Stuber

is your app closing all of the connections it opens?
Check the alert log so see if there are any messages relaying to this.

My guess is the instance is maxing out on connections.

When you get this error again, connect directly and check: select count(*) from v$session;

Then check the processes parameter for the database.
Avatar of gbcbr

ASKER

This happened after Oracle crash and recovery. before it shows 38-44 sessions open, but now jump like crazy
Database opened.
SQL> select count (*) from v$session;

  COUNT(*)
----------
       200

SQL> select count (*) from v$session;

  COUNT(*)
----------
       111

SQL> select count (*) from v$session;

  COUNT(*)
----------
       149

SQL> select count (*) from v$session;

  COUNT(*)
----------
       167

SQL> select count (*) from v$session;

  COUNT(*)
----------
        88

SQL> select count (*) from v$session;

  COUNT(*)
----------
       103

SQL> select count (*) from v$session;

  COUNT(*)
----------
       108

SQL> select count (*) from v$session;

  COUNT(*)
----------
       118

SQL> select count (*) from v$session;

  COUNT(*)
----------
       128

SQL> select count (*) from v$session;

  COUNT(*)
----------
       149

SQL> select count (*) from v$session;

  COUNT(*)
----------
        93

Open in new window


Maybe you could look at this in
http://en.newinstance.it/2007/06/01/ora-12519-tnsno-appropriate-service-handler-found/
although you are probably not using OracleXE:

For example this one: when you use your poor Oracle connected application, after some time of activity you get “ORA-12519, TNS:no appropriate service handler found”, and you don’t get any more connection from the db, with SQLExceptions instead. The quick way to solve, is to restart the listener. Not bad uh, for a “proven industry database”, isn’t that?

Googling around I found that this is a bug on how OracleXE monitors processes, and issuing the following command at SQL command line will fix it (after restarting the listener): “ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;”.
Worked for me. This saved me to install Oracle Enterprise on my laptop.

so, something is opening and closing connections,  but sometimes it's opening many more than it closes.

so,  either you have incomplete closes, that is sometimes you open and close, but other times not, so you'll eventually creep higher and higher

or,  you have your process/session limit too low

or both
Avatar of gbcbr

ASKER

@for_yan
>>The quick way to solve, is to restart the listener.
It doesn't help, I need restart DB
>>ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE
I have 300

@sdstuber
>>so you'll eventually creep higher and higher
You see it jumps up and down from 200 to 93. This is abnormal, as I told before I had range 38-44 processes, now 200-93
the database only has a process limit,  it's not going to create processes spontaneously (other than the dozen or so core process like dbwriter, job queue, etc)

So, if you're seeing a spike, that must be one or more applications.  Either you really have more work going on now than previously,  or your app( maybe more than one) is not closing connections when it should
Avatar of gbcbr

ASKER

It's 2 Java app working on this server and they have no problem with TNS. Another one connected from local protected network. Problem happened on this external application, but this application was not damaged or have any changes in the code for last 4 month. This is strange for me. If I did any changes, of course first I will check them.
>>I have 300

Try 600?
Avatar of gbcbr

ASKER

Why not 6000? This is not a solution. Something broken in Oracle. I repeat, I never had before so much open processes, so the question is to find what are these processes and who open them.
As soon I start using pools, I never had more that 44 open processes, setting for 300 left from previous experiments and I leave it.
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gbcbr

ASKER

So new error message
14.06.2011 19:15:26 com.fxcm.messaging.util.pdas.xml.PXmlParser fromXml
SEVERE: Exception of xml formed message parsing:
org.xml.sax.SAXParseException: unexpected end of file found
	at uk.co.wilson.xml.MinML.fatalError(MinML.java:588)
	at uk.co.wilson.xml.MinML.parse(MinML.java:433)
	at uk.co.wilson.xml.MinML.parse(MinML.java:489)
	at com.fxcm.messaging.util.pdas.xml.PXmlParser.fromXml(PXmlParser.java:113)
	at com.fxcm.messaging.util.pdas.PDasMessageFactory.fromXml(PDasMessageFactory.java:154)
	at com.fxcm.messaging.util.pdas.communicator.Communicator.request(Communicator.java:471)
	at com.fxcm.messaging.util.pdas.communicator.Communicator.run(Communicator.java:350)
	at java.lang.Thread.run(Thread.java:680)
14.06.2011 19:15:26 com.fxcm.messaging.util.pdas.communicator.Communicator request
SEVERE: Exception of xml formed message parsing: org.xml.sax.SAXParseException unexpected end of file found
com.fxcm.GenericException: Exception of xml formed message parsing: org.xml.sax.SAXParseException unexpected end of file found
	at com.fxcm.messaging.util.pdas.xml.PXmlParser.fromXml(PXmlParser.java:116)
	at com.fxcm.messaging.util.pdas.PDasMessageFactory.fromXml(PDasMessageFactory.java:154)
	at com.fxcm.messaging.util.pdas.communicator.Communicator.request(Communicator.java:471)
	at com.fxcm.messaging.util.pdas.communicator.Communicator.run(Communicator.java:350)
	at java.lang.Thread.run(Thread.java:680)
Caused by: org.xml.sax.SAXParseException: unexpected end of file found
	at uk.co.wilson.xml.MinML.fatalError(MinML.java:588)
	at uk.co.wilson.xml.MinML.parse(MinML.java:433)
	at uk.co.wilson.xml.MinML.parse(MinML.java:489)
	at com.fxcm.messaging.util.pdas.xml.PXmlParser.fromXml(PXmlParser.java:113)
	... 4 more
14.06.2011 19:15:26 com.fxcm.messaging.util.pdas.communicator.Communicator request
SEVERE: Exception of xml formed message parsing: org.xml.sax.SAXParseException unexpected end of file found: Message type=U54
SID=E10R2_u8sMjjJwjfSqtpUQ0MONLtKA69DlMTX66VwJzPXS1HDQxzBAiBSbim0n1E
9028=0
112=E10R2_u8sMjjJwjfSqtpUQ0MONLtKA69DlMTX66VwJzPXS1HDQxzBAiBSbim0n1E-60706
WaitTime=3000
625=EURCFDREAL01
336=FXCM
9016=list
--------
1:	9018=0;9017=BrcastID;
2:	9018=0;9017=MsgID;
3:	9018=0;9017=MailID;
4:	9018=0;9017=MessageFlags;
5:	9018=3000;9017=TimeOut;
--------

Open in new window

Avatar of gbcbr

ASKER

This is analysis by machines but  why it does up to 75 and jump down to 19
SQL>  select machine, count (*) from v$session group by machine;

MACHINE                                                            COUNT(*)
---------------------------------------------------------------- ----------
lionfx                                                                   47
iMac-Office.local                                                        62

SQL>  select machine, count (*) from v$session group by machine;

MACHINE                                                            COUNT(*)
---------------------------------------------------------------- ----------
lionfx                                                                   45
iMac-Office.local                                                        68

SQL>  select machine, count (*) from v$session group by machine;

MACHINE                                                            COUNT(*)
---------------------------------------------------------------- ----------
lionfx                                                                   48
iMac-Office.local                                                        75

SQL>  select machine, count (*) from v$session group by machine;

MACHINE                                                            COUNT(*)
---------------------------------------------------------------- ----------
lionfx                                                                   46
iMac-Office.local                                                        19

SQL>

Open in new window

Avatar of gbcbr

ASKER

I'll check app
xml error is a new question.

as for the jump in session count,  same thing I've been saying all along.  Your app is opening and closing connections but not in a uniform manner.  

That doesn't necessarily mean it's doing anything wrong, but only you can verify if the number of connections corresponds to actual work or not.  There's no way for any of us to know if your session count is correct.
Maybe the XML error is the root cause.  If the app doesn't properly handle the error it can be leaving the connection open.