LDP Neighbor - Holdown / Discovery timer expired.
Hello,
I'm having an intermittent issue with LDP sessions dropping between one specific router and it's two peers.
Solution background:
We have 3 x 7201 (NPE-G2) running c7200p-spservicesk9-mz.150-1.M5.bin.
The routers are arranged in a "triangle" with a link to each router utilising G0/2 + 3 on each router, IGP is OSPF with all routers + loopbacks being in OSPF Area 0. OSPF RID + MPLS RID is Lo0.
Routers are called ABC-CORE-1, CCC-CORE-1, CBC-CORE1.
During the "outage" the DLP session between ABC->CBC remains constant without issue, however the LDP sessions with CCC-CORE1 both drop stating the following:
ABC-CORE-1#show log
Apr 3 17:30:40.236: %LDP-5-NBRCHG: LDP Neighbor 10.64.255.2:0 (1) is DOWN (Received error notification from peer: Holddown time expired)
Apr 3 17:30:44.180: %LDP-5-NBRCHG: LDP Neighbor 10.64.255.2:0 (1) is UP
CCC-CORE-1#show log
.Apr 3 17:30:39: %LDP-5-NBRCHG: LDP Neighbor 10.64.255.1:0 (1) is DOWN (Discovery Hello Hold Timer expired)
.Apr 3 17:30:43: %LDP-5-NBRCHG: LDP Neighbor 10.64.255.1:0 (3) is UP
Neighbor output:
CCC-CORE-1#sh mpls ldp neigh 10.64.255.1 det
Peer LDP Ident: 10.64.255.1:0; Local LDP Ident 10.64.255.2:0
TCP connection: 10.64.255.1.646 - 10.64.255.2.36718
Password: not required, none, in use
State: Oper; Msgs sent/rcvd: 1191/1192; Downstream; Last TIB rev sent 130
Up time: 16:24:42; UID: 10; Peer Id 2;
LDP discovery sources:
GigabitEthernet0/2; Src IP addr: 10.64.0.1
holdtime: 15000 ms, hello interval: 5000 ms
Addresses bound to peer LDP Ident:
10.64.2.1 192.168.128.126 10.64.0.1 10.64.0.5
10.64.255.1 10.64.254.1
Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab
Clients: Dir Adj Client
Capabilities Sent:
[Dynamic Announcement (0x0506)]
[Typed Wildcard (0x0970)]
Capabilities Received:
[Dynamic Announcement (0x0506)]
[Typed Wildcard (0x0970)]
ABC-CORE-1#show mpls ldp neigh 10.64.255.2 det
Peer LDP Ident: 10.64.255.2:0; Local LDP Ident 10.64.255.1:0
TCP connection: 10.64.255.2.36718 - 10.64.255.1.646
Password: not required, none, in use
State: Oper; Msgs sent/rcvd: 1193/1191; Downstream; Last TIB rev sent 130
Up time: 16:25:05; UID: 8; Peer Id 0;
LDP discovery sources:
GigabitEthernet0/2; Src IP addr: 10.64.0.2
holdtime: 15000 ms, hello interval: 5000 ms
Addresses bound to peer LDP Ident:
10.64.2.5 192.168.128.254 10.64.0.2 10.64.0.9
10.64.255.2 10.64.254.2
Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab
Clients: Dir Adj Client
Capabilities Sent:
[Dynamic Announcement (0x0506)]
[Typed Wildcard (0x0970)]
Capabilities Received:
[Dynamic Announcement (0x0506)]
[Typed Wildcard (0x0970)]
I've just enabled MPLS IGP sync this morning aftere reading a few articles however I'm not convicnced that's going to make much difference, has anyone ever experieced this before?
Thanks,
Duncan.
Duncan Mossop wrote:Hello,I'm having an intermittent issue with LDP sessions dropping between one specific router and it's two peers.Solution background:We have 3 x 7201 (NPE-G2) running c7200p-spservicesk9-mz.150-1.M5.bin.The routers are arranged in a "triangle" with a link to each router utilising G0/2 + 3 on each router, IGP is OSPF with all routers + loopbacks being in OSPF Area 0. OSPF RID + MPLS RID is Lo0.Routers are called ABC-CORE-1, CCC-CORE-1, CBC-CORE1.During the "outage" the DLP session between ABC->CBC remains constant without issue, however the LDP sessions with CCC-CORE1 both drop stating the following:ABC-CORE-1#show logApr 3 17:30:40.236: %LDP-5-NBRCHG: LDP Neighbor 10.64.255.2:0 (1) is DOWN (Received error notification from peer: Holddown time expired)Apr 3 17:30:44.180: %LDP-5-NBRCHG: LDP Neighbor 10.64.255.2:0 (1) is UPCCC-CORE-1#show log.Apr 3 17:30:39: %LDP-5-NBRCHG: LDP Neighbor 10.64.255.1:0 (1) is DOWN (Discovery Hello Hold Timer expired).Apr 3 17:30:43: %LDP-5-NBRCHG: LDP Neighbor 10.64.255.1:0 (3) is UPNeighbor output:CCC-CORE-1#sh mpls ldp neigh 10.64.255.1 det Peer LDP Ident: 10.64.255.1:0; Local LDP Ident 10.64.255.2:0 TCP connection: 10.64.255.1.646 - 10.64.255.2.36718 Password: not required, none, in use State: Oper; Msgs sent/rcvd: 1191/1192; Downstream; Last TIB rev sent 130 Up time: 16:24:42; UID: 10; Peer Id 2; LDP discovery sources: GigabitEthernet0/2; Src IP addr: 10.64.0.1 holdtime: 15000 ms, hello interval: 5000 ms Addresses bound to peer LDP Ident: 10.64.2.1 192.168.128.126 10.64.0.1 10.64.0.5 10.64.255.1 10.64.254.1 Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab Clients: Dir Adj Client Capabilities Sent: [Dynamic Announcement (0x0506)] [Typed Wildcard (0x0970)] Capabilities Received: [Dynamic Announcement (0x0506)] [Typed Wildcard (0x0970)]ABC-CORE-1#show mpls ldp neigh 10.64.255.2 det Peer LDP Ident: 10.64.255.2:0; Local LDP Ident 10.64.255.1:0 TCP connection: 10.64.255.2.36718 - 10.64.255.1.646 Password: not required, none, in use State: Oper; Msgs sent/rcvd: 1193/1191; Downstream; Last TIB rev sent 130 Up time: 16:25:05; UID: 8; Peer Id 0; LDP discovery sources: GigabitEthernet0/2; Src IP addr: 10.64.0.2 holdtime: 15000 ms, hello interval: 5000 ms Addresses bound to peer LDP Ident: 10.64.2.5 192.168.128.254 10.64.0.2 10.64.0.9 10.64.255.2 10.64.254.2 Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab Clients: Dir Adj Client Capabilities Sent: [Dynamic Announcement (0x0506)] [Typed Wildcard (0x0970)] Capabilities Received: [Dynamic Announcement (0x0506)] [Typed Wildcard (0x0970)]I've just enabled MPLS IGP sync this morning aftere reading a few articles however I'm not convicnced that's going to make much difference, has anyone ever experieced this before?Thanks,Duncan.
For anyone that's interested I fixed this problem after some in depth troubleshooting.
Turns out the CCC router has CEF disabled.
I followed the through the following process:
Noticed flushes in the inteface counters -> researched SPD (selective packet discard) -> looked into CPU usage -> noticed IP Input process running 90%+, checked CEF with "show ip cef" showed a full adjancency table.
Checked the command "show cef interface"
Boom, "CEF Switching disabled" on every interface.
"no ip cef" "ip cef" , fixed.
For reference the running config did indeed show "ip cef" as entered and turned on.
Only thing I can think is when we upgraded from 12.4 to 15.0(1)M there was a glitch with CEF....
Very strange.
Similar Messages
-
TIME EXPIRED! I CAN'T SYNC MY IPOD!
Just iesterday i put a conversation asking something about iPod touch...and today i bought it...i couldn't resist!
BUT i go home and i install it...i have itunes 7.5 the last... connect my ipod and immediatly it recognizes it! "Amazing" i said i haven't problem!
TOO EARLY! when i try to sync my ipod on the ipodtouch screen there's a battery with written "syncronization" it starts and on the computer i see sync 2 of 45... IT STOPS AND IPOD RETURNS ON THE HOME PAGE AND IT DOESN'T DO ANYTHING!
I DOESNT' SYNC ANYTHING AND A MESSAGE SAYS TIME EXPIRED!AND I DON'T HAVE ANYTHING!
I'M THROUGH WITH ALL THE APPLE STUFFS! i'm frustrated and i'm about to cry! i ca'nt stand apple anymore! anything i buy works!!!! ANYTHING!!!! please help me! i don't know what to say i'm soooo frustrated and sad... :'(Whoa. Relax, take your finger off the Caps Lock...
Some items don't sync well with all devices so perhaps for the first sync just set the iPod to sync with a single iTunes playlist, then build from there.
Now try working through the following steps. Do them all in order even if you think you've done them before:
http://www.apple.com/support/ipodtouch/troubleshooting/itunes/
Let us know how you get on (preferably with calm descriptions of symptoms! )
cheers
mrtotes -
Getting time expired error in labview while getting screen capture
Hello,
I have to capture a screen shot for Agilent's Spectrum analyzer, ESA series. But Whenever i run the program i always get time expired before operation is completed. I am attaching the program and also screen-shot of program. If anyone can solve this problem i would be very glad.
Thanking you all...
Pals
Solved!
Go to Solution.
Attachments:
PSA Screen Capture via GPIB.jpg 39 KB
VISA Read Binary Block Data to File.jpg 48 KB
PSA Screen Capture via GPIB.llb 91 KBHi,
I tried to increase the time out but it didnt work. i am trying to read 1 byte at a time... So is it ok?
Thanks so much....
Attachments:
PSA Screen Capture via GPIB.jpg 39 KB
VISA Read Binary Block Data to File.jpg 48 KB -
Cannot get Local Connection, No available resource, Wait-time expired
Hi Friends,
Please answer my queries below.
Thanks and Regards
Busincess Requirement
I have to display a particular set of rows in a dashboard or screen, and it is being refreshed every 1 minute, also user can update from that screen displayed values.
The below program extracts some data from database and passes to the front end through a collection where it is being displayed.
Code Logic Flow
1. CockpitAction calls CockpitOraDAO for database results
2. CockpitOraDAO is a singleton class.
3. After getting the CockpitOraDAO object, the action will then call the getLabAreaCockpitDetails() method.
getLabAreaCockpitDetails will
- Get the Connetion from the OracleConnectionManager class (It is a plain class with getPooledConnection() and releaseConnection() methods).
- Execute the query and put the result to a collection
- close the connection
- return result to the calling action.
This getLabAreaCockpitDetails() are called around once in every 1 minute
So, I believe everytime a call is made to action for cockpit display, it will take the existing object of the CockpitOraDAO class and make a call to database. i.e there will be only one object of CockpitOraDAO reside in application server at any particular interval of time.
My Understandings
1. Only 1 object of CockpitOraDAO will reside in application server (provided it is not user longer and garbage collected) at a particular instance.
2. Many objects of Connection will be created and destroyed.(Each time the getLabAreaCockpitDetails() method is called, we will get one connection from connection pool and in finally the Connection will be released to connection pool).
My Problems
It is showing the "Cannot get Local Connection, No available resource, Wait-time expired"
after running around 1 full day.
My doubts
1. Can anybody say why I get this error ?
2. There may be some connections are not closed. But I have checked at finally block, the status of the connection is closed after calling this method.
3. There may be some problem due to the singleton instane of CockpitOraDAO, Is it affecting performance ?
4. Is it valid that I have to make CockpitOraDAO as Singleton ?
public class CockpitOraDAO extends DAOAdaptor //implements BISample
private static CockpitOraDAO instance=null;
private static boolean debug = true;
* The below method will be used to provide the singleton intance of the CockpitOraDAO object.
public static CockpitOraDAO getInstance()
if (instance == null)
synchronized (CockpitOraDAO.class)
if (instance == null)
instance = new CockpitOraDAO();
return instance;
* The below method will be used to get the cockpit details of the lab area.
* This will return collecton of sample details for the specific lab.
public Collection getLabAreaCockpitDetails(Collection prevCockpitDetailList,Collection filterCriteria) throws Exception
if(debug)
System.out.println("Inside CockpitOraDAO::getLabAreaCockpitDetails() method");
Connection conn = null;
boolean sampleExists = false;
PreparedStatement pstmt=null;
ResultSet rs=null;
String returnStr=null;
StringBuffer sqlQuery = null;
String tempComment1=null, tempComment2=null;
LabCockpitDO labc=null;
LabCockpitDO labc2=null;
Collection resultList=null, manCommentList=null, labCommentList=null, labCompCommentList=null;
ArrayList result1List=null, prevCockpitDetail1List=null,filterList = null;
OracleConnectionManager manager = null;
boolean flag = false;
try
labc2 = new LabCockpitDO();
prevCockpitDetail1List = (ArrayList) prevCockpitDetailList;
sqlQuery = new StringBuffer();
sqlQuery.append("select s.sample_sample_no sample_no, s.sample_inspection_lot_no inspection_lot_no,");
manager = new OracleConnectionManager();
conn = manager.getPooledConnection("myDS");
pstmt = conn.prepareStatement(sqlQuery.toString());
if(debug)
System.out.println("Query********"+sqlQuery.toString());
rs = pstmt.executeQuery();
catch(Exception e)
//System.out.println(e);
throw e;
finally
try
manager.releaseConnection("myDS");
if(debug)
System.out.println("Connection Status Closed=true/ Open=false=["+conn.isClosed()+"]");
if(conn!=null || !conn.isClosed())
conn.close();
if(debug)
System.out.println("Connection Status After Closing Connection Closed=true/ Open=false=["+conn.isClosed()+"]");
if(rs != null)
rs.close();
if(pstmt != null)
pstmt.close();
conn = null;
pstmt=null;
rs = null;
sqlQuery=null;
returnStr=null;
labc=null;
labc2=null;
manCommentList=null;
labCommentList=null;
labCompCommentList=null;
tempComment1=null;
tempComment2=null;
resultList=null;
prevCockpitDetailList=null;
prevCockpitDetail1List=null;
catch(Exception e)
//System.out.println("Unable to Release Connection ="+e);
throw e;
//if(debug)
//System.out.println(resultList);
return result1List;
}Hi,
As you can see from other posts, this is a very common problem. Until now the cause always ends up pointing to a connection not being close.
I suggest you try to run through a full single cycle of you app, while using the CLI monitoting to check that the connections created/closed matches the expected created/closed connections. Also that the number of free connections at the end is correct. -
Error : No available resource. Wait-time expired.
Hi,
We have a big problem of connection pooling in SunOne.
After out program execute a lot of sql command in a short time, SunOne 7.0 throws an Exception ---- No available resource. Wait-time expired. We modify the connection pool setting, but it doesn't work. Can someone help to solve problem.
Our connectiong pool setting as below :
<jdbc-connection-pool steady-pool-size="8" max-pool-size="32" max-wait-time-in-millis="60000" pool-resize-quantity="2" idle-timeout-in-seconds="300" is-isolation-level-guaranteed="false" is-connection-validation-required="true" connection-validation-method="auto-commit" fail-all-connections="false" datasource-classname="oracle.jdbc.pool.OracleDataSource" name="xxx">
<property value="jdbc:oracle:thin:@aa:1521:aa" name="URL"/>
<property value="xxx" name="user"/>
<property value="xxx" name="password"/>
</jdbc-connection-pool>
Thanks!
ElsaThis issue is not resolved. I got this message this afternoon. It has nothing to do with ejb. Just for confirming this issue again, I created a very simple application, a jsp that calls a servlet. In the servlet, I have a loop that calls a getNewConnection(). and returns the connection, then I create a Statement with that connection. Then I call another method releaseResources(Statement stmt)
Connection conn = stmt.getConnection();
if(conn != null)
System.out.println("connection: " + conn);
conn.close();
// conn = null; tried this one also, same result
The code is OK. including try/catch blocks ans so on.
If the number of loops greater than the connection pool size, then I get the same exception. It means the connections are not getting closed. But if I change the methode and pass Connection instead of Statement, then it workes fine.
I have tested this in App server7 with:
Oracle 9.2.0 client and ojdbc14.jar
Oracle 9.2.0 client and classes12.jar
Oracle 9.0.1 client and classes12.jar
Oracle 8.1.6 client and classes12.zip
all with thin or oci drivers.
It looks like something to do with Statement.getConnection() and the version of AppServer jdk (1.4.0.2).
I know the getConnection methode does return A connection. I can print the connection id. -
When-timer-expired hit the cursor position
Some of our forms sometimes have timers running, to monitor
progress of this and that. We've found that if the timer
expires when you're typing in a form field, there's a tendency
for the cursor to momentarily move to the beginning of the field
then jump back to roughly where it had been. If you're just
typing away without paying attention, this can be messy.
Specifically, I put a few '0' characters at the beginning of a
large field, then hit '1' and let it go to autorepeat. When the
trigger fires, the insert cursor goes to a wait cursor for a
bit, then back. I'll find a few '1' characters at the beginning
of the field, and the insert cursor is now pointing the same
number of characters from the end of the field. My testing
indicates that the more time spent in the trigger, the more
likely the problem is to occur. Also, it happens more if
you're in a different form than the one with the timer.
does anyone know how to handle this situation
i m using when_timer_expired trigger with folllowing code
declare
v_timer varchar2(40);
begin
v_timer:=get_application_Property(timer_name);
if v_timer='TIMER_TIME' then
:CONTROL.onscreen:=to_char(sysdate,'HH12:mi:ss AM');
end if;
end;You could use JDAPI to make bulk changes to your Forms ...
Re: Reading items/blocks/LOVs in the Object Navigator
h2. UPDATE:
Take a look at metalink note 45615.1 - Focus And Timer Behavior In Multiple Form Applications
It seems you need to keep destroying and recreating the timer as you navigate from Form to Form ..
Edited by: Rodolfo Ferrari on Aug 20, 2009 6:26 PM -
Java.sql.SQLException: No available resource. Wait-time expired.
Hi all,
The application platform is SunONE Application Server 7, and the database is ORACLE 9i. My Website application will raise the SQLException once a few days' running. Everything will be ok once the Application server has been restarted. The detail about the Exception is :
[12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr: java.sql.SQLException: No available resource. Wait-time expired.
[12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr: at com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(JdbcDataSource.java:251)
[12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr: at com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:98)
[12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr: at com.tsp.gdgpo.ejbm.util.EnvUtil.getDSConnection(EnvUtil.java:72)
[12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr: at com.tsp.gdgpo.ejbm.util.DirectDSUtil.getObjectsFromDS(DirectDSUtil.java:103)
[12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr: at com.tsp.gdgpo.ejbm.jcsms.dam.JcsmsDDSA.getSpecialistByPage(JcsmsDDSA.java:388)
[12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr: at com.tsp.gdgpo.ejbm.jcsms.sessionbeans.SpecialManagerEJBBean.listSpecialist(SpecialManagerEJBBean.java:1941)
[12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr: at com.tsp.gdgpo.ejbm.jcsms.sessionbeans.SpecialManagerEJBBean_EJBObjectImpl.listSpecialist(SpecialManagerEJBBean_EJBObjectImpl.java:702)
[12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr: at com.tsp.gdgpo.ejbm.jcsms.sessionbeans._SpecialManagerEJBBean_EJBObjectImpl_Tie._invoke(Unknown Source)thanks for any help
NiuTher is a related Bug i n Oracle: Bug No. 4420032
PROBLEM STATEMENT: ------------------
The Oracle client file ojdbc_14.jar is not handling exceptions correctly. The connection pool slowly runs out of connections and hits the oracle db limit of max_sessions. Increasing the db max_sessions does not help as the number of sessions continue to increase.
The vendor developers of ct's application have identified a code problem with the Oracle client file ojdbc_14.jar. Their description follows.
The following is a technical description of the Oracle JDBC client library issue. The jar file in question is: ojdbc_14.jar. This issue is also present in the 9.2.05 and 9.2.06 versions of the client code.
The socket.close() call in TcpNTAdapter.disconnect() does not properly handle network exceptions. Where the exception should be handled within the code segment calling socket.close(), the class instead throws an exception without ensuring the socket is closed. The socket is not subsequently closed by clients of the class. This ultimately results in a connection leak. Overtime, the maximum number of Oracle database sessions is reached. The only work around for this issue in production, is to restart the effected processes.
The code segment:
public void disconnect()
throws IOException {
socket.close();
socket = null; }
should be along the lines of:
public void disconnect()
throws IOException {
try{ socket.close(); }
catch(IOException ioe){ throw ioe; }
finally{ socket = null; } }
The original code segment will not execute the statement "socket = null" when . an exception occurs. Given the fact that the exception is not subsequently processed properly, the object is never dereferenced, and the socket remains open for the life of the process. Adding this statement in the finally block . ensures the object will ultimately be destroyed by the garbage collector. . ct tested this change in their lab and found that the recommended modification successfully resolved the issue.
This problem has occurred with the previous ct's application releases, but the vendor has only recently been able to isolate the root cause. The JDBC connection pool slowly runs out of connections and hits the oracle db limit of max_sessions.
Increasing the db max_sessions does not help as the number of sessions continue to increase. This problem has been occuring in Production over the past few releases of the application, but usually the connections leak slowly. This problem can be duplicated under heavy load in just a few minutes . in the Loadtest environment. -
i downloaded th trial version but i cant open photoshop , and it is telling me time expired , What to do ?
Supply pertinent information for quicker answers
The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
Adobe product and version number
Operating system and version number
The full text of any error message(s)
What you were doing when the problem occurred
Screenshots of the problem
Computer hardware, such as CPU; GPU; amount of RAM; etc. -
Hi everyone,
This is my first time using this trigger and i dont really catch what to do to make it fire. Arwind advices me to use it to make the valus of the item blink. The way i see it it should work but i guess i'm missing something...could u plz help me find what i'm missing here.
Here is the only code i have for the trigger.
DECLARE
id_item ITEM;
timerid TIMER := FIND_TIMER('BLINK');
BEGIN
if :prix_en_vigueur is not null then
/*--- Make the item blink ---*/
id_item := find_item('PRIX_EN_VIGUEUR');
set_timer(timerid, 1000, REPEAT);
if get_item_property('id_item',DISPLAYED) = 'PROPERTY_TRUE' then
set_item_property(Id_item,
DISPLAYED,PROPERTY_FALSE);
else
set_item_property(Id_item, DISPLAYED,PROPERTY_TRUE);
end if;
end if;
END;
Does it have something to do with the set_timer or delete_timer and if so how should i use them.
Thanx in advance for ur replies.
nullYou have the when-timer-expired defined at form level. In it you should first have a call to get_application_property(TIMER_NAME), that returns the name of the timer that has made the trigger fire, depending on which you perform what you have to do under those circumstances.
How to make it fire? In whatever trigger you find appropriate you call set_timer, that starts the countdown for the number of milisecs you specify that finally generates the "Timer-Expired" event which makes the trigger fire.
Regards,
BD -
No available resource. Wait-time expired.
Dear All
I am using sun ONE applications server. I am struggling with No available resource. Wait-time expired problem. MY Pool configurations are steady:20,max:100,inc:2. My code is very straight forward.
Getting the connection, using the connection and closing the connection. I made sure that the connection opened is getting closed. But still after certain no. of requests my request is getting blocked. What might be the problem.
Regards,
Nagaraju.KVHi,
As you can see from other posts, this is a very common problem. Until now the cause always ends up pointing to a connection not being close.
I suggest you try to run through a full single cycle of you app, while using the CLI monitoting to check that the connections created/closed matches the expected created/closed connections. Also that the number of free connections at the end is correct. -
Database Error: RSR0009: Resource not available for pool. Wait-time expired
i am occassionally receiving the following error during database connections in my servlet:
Database Error: RSR0009: Resource not available for pool [webAdvisorTestPool]. Wait-time expired
i understand that this is a result of a connection leak from improper closure of my Connection object, but i thought that i was properly closing my connection.
i can get the error if i do the following steps:
1) access my login page and enter login credentials.
2) submit the login which then hits the Authentication servlet.
3) Authentication servlet authenticates and takes me to home page.
4) hit the back button to get back to the login page.
5) repeat this process until i hit the Max Pool Size (from web server).
6) then i get the error message
here are some details:
i have an Authentication servlet; here is the pertinent code from that servlet:
try { // retrieve the user and add the User object to the session DAO dao = new DAO(); Person authenticUser = dao.getPerson(userID, password); session.setAttribute("validUser", authenticUser); redirectPage = mapping.findForward("success"); }
i also have a DAO object that handles all of my DB transactions (and you can see from my code above that the Authentication servlet is using that object); here is the pertinant code from that servlet:
public DAO() { datasource = "java:comp/env/jdbc/webAdvisorTest"; } public Person getPerson(String userID, String password) throws ObjectNotFoundException { // JDBC variables DataSource ds = null; Connection conn = null; PreparedStatement stmt = null; ResultSet results = null; // User variables Person validUser = null; try { // Retrieve the DataSource from JNDI InitialContext ctx = new InitialContext(); // if this statement fails, NamingException is thrown ds = (DataSource)ctx.lookup(datasource); // get DB connection and perform SQL operations conn = ds.getConnection(); // User variables String validUserID = null; String validFName = null; String validLName = null; String validEmail = null; // get DB connection and perform SQL operations conn = ds.getConnection(); stmt = conn.prepareStatement(PERSON_QUERY); stmt.setString(1, userID); stmt.setString(2, password); results = stmt.executeQuery(); // iterate through the results if (results.next()) { validUserID = results.getString("id"); validFName = results.getString("first_name"); validLName = results.getString("last_name"); validUser = new Person(validUserID, validFName, validLName); } } // handle SQL errors catch(SQLException e) { e.printStackTrace(System.err); throw new RuntimeException("Database Error: " + e.getMessage()); } // handle JNDI errors catch(NamingException e) { throw new RuntimeException("JNDI Error: " + e.getMessage()); } // clean up resources finally { doClosure(results, stmt, conn); } // if the user was not found, throw ObjectNotFoundException if(validUser == null) { throw new ObjectNotFoundException(); } return validUser; } protected void doClosure(ResultSet results, PreparedStatement stmt, Connection conn) { if (results != null) { try { results.close(); } catch (SQLException e) { e.printStackTrace(System.err); } } if (stmt != null) { try { stmt.close(); } catch (SQLException e) { e.printStackTrace(System.err); } } if (conn != null) { try { System.out.println("R18Resources.conn before close: " + conn); conn.close(); System.out.println("R18Resources.conn after close: " + conn); System.out.println("R18Resources.conn is closed? " + conn.isClosed()); } catch (SQLException e) { System.out.println("R18Resource conn close error: " + e.getMessage()); } } }
as you can see, i've added some print statements in my connection closure block. based on my output log, each connection is being properly closed and i am not encountering any errors during that closing block.
any ideas???
Message was edited by:
millerandPlease try the following code in your doClosure method. Replace your code with the following code.
public void doClosure(ResultSet pResultSet, Statement pStmt, Connection pConn) throws Exception {
try {
if (pResultSet != null) {
pResultSet.close();
pResultSet = null;
} catch (SQLException se) {
logger.error( se );
} finally {
try {
if (pStmt != null) {
pStmt.close();
pStmt = null;
} catch (SQLException se) {
logger.error(se);
} finally {
try {
if (pConn != null) {
pConn.close();
pConn = null;
} catch (SQLException se) {
logger.error(se);
And let me know if you still face this issue. What is the application server you are using? -
Timer expired and something unexpected occured
Hi all,
There is a timer in my forms , and there is the when-timer-expired form-level trigger.
The problem is that :
1) when I type something in a text item , then when the timer expires all the content of the text item are selected and is cleared if I did not notice it and if I continue to type.
2) when I click on a menu item and the timer expires at the same time then it is not the correct form which is called but another form.
So how to resolve these anomalies ?
Thank you very much indeed.The timer is looking for inactivity duration time :
if Win_API_Session.Timeout_get_inactive_time > name_in('global.inactivity_time') then
end if;
And there is this at the when-window-activated trigger:
hWind := get_window_property(FORMS_MDI_WINDOW,WINDOW_HANDLE);
Win_API_Session.Timeout_Start_Timer(hWind);
So what should cause the problems ? -
GO_FORM when TIMER-EXPIRED
Just want to know if I am doing something wrong
or if it's another feature of Forms. I have a
GO_FORM within an IF statement in the (repeating)
WHEN-TIMER-EXPIRED trigger. It all goes well until
the IF statement evaluates to a value that makes
GO_FORM the case, the repeating timer seems to go
dead after GO_FORM switches the focus to the
specified form. Any comments? Thanks in advance.Hi Eugeniy,
The original WBP trigger has already the following code:
go_item('bijz.click_datum');
do_key('list_values');
The section where copy ('0','GLOBAL.save_mouse_record'); is mentioned is part of the code that Metalink offered me, look at:
Note 266535.1 How to call to a calender window against an unbound item via an LOV button.doc
Best regards,
Ronny. -
Regarding When-timer-expired trigger
Hi,
My requirement is to display time .From my understanding i think every time
when-timer-expired shuttle between client and middle tier for this purpose for
every expiry of time .This i feel degrades the performance.
Is there any workaround available so that the database time is fetched for the first
time and thereafter refreshing could takeplace in the client-side
Thanks in advance
regards,
prabakaran.sHere is the code:
package oracle.forms.fd;
import java.awt.AWTEventMulticaster;
import java.awt.Color;
import java.awt.Cursor;
import oracle.forms.handler.IHandler;
import oracle.forms.properties.ID;
import oracle.forms.ui.VTextField;
* A PJC to have a textfield blinking
* @author Francois Degrelle
* @version 1.0
public class BlinkTextField extends VTextField implements Runnable
public final static ID START = ID.registerProperty("START");
public final static ID STOP = ID.registerProperty("STOP");
public final static ID SETBLINKRATE = ID.registerProperty("SETBLINKRATE");
public final static ID SETFGCOLOR = ID.registerProperty("SETFGCOLOR");
public final static ID SETBGCOLOR = ID.registerProperty("SETBGCOLOR");
static Thread runner ;
protected int seconds = 400 ; // milliseconds
private Color cdefFG = null ; // default background color
private Color cdefBG = null ; // default foreground color
private Color cFore = null ; // blinking foreground color
private Color cBack = null ; // blinking background color
private boolean bSwitch = true ;
private IHandler m_handler;
public BlinkTextField ()
super();
public void init(IHandler handler)
m_handler = handler;
super.init(handler);
cdefFG = this.getForeground() ;
cdefBG = this.getBackground() ;
* switch color to simulate the blinking process
public void run()
Thread theThread = Thread.currentThread();
while (runner == theThread)
try{
Thread.sleep(seconds);
} catch (InterruptedException e) { }
if(bSwitch)
if(cBack != null) this.setBackground(cBack);
if(cFore != null) this.setForeground(cFore);
else
this.setBackground(cdefBG);
this.setForeground(cdefFG);
bSwitch = ! bSwitch ;
private void startTimer()
if (runner == null )
runner = new Thread(this);
runner.start();
private static void stopTimer()
if (runner != null )
runner = null;
public boolean setProperty(ID property, Object value)
if (property == START) // start the blinking
startTimer() ;
System.out.println("** Start **");
return true;
if (property == STOP) // stop the blinking
System.out.println("** Stop **");
stopTimer() ;
return true;
else if (property == SETBLINKRATE) // set the cursor blink rate
int i = Integer.parseInt(value.toString());
seconds=i;
System.out.println("** SetRate="+seconds+ " miliseconds");
return true;
else if (property == SETFGCOLOR) // set the foreground color
cFore = getColor(value.toString()) ;
System.out.println("** SetFGColor="+cFore);
return true;
else if (property == SETBGCOLOR) // set the background color
cBack = getColor(value.toString()) ;
System.out.println("** SetBGColor="+cBack);
return true;
else
return super.setProperty(property, value);
// expects r,g,b values separated by commas
public Color getColor(String colourValue)
try{
int r,g,b;
int rPos, gPos;
rPos = colourValue.indexOf(",");
gPos = colourValue.indexOf(",", rPos + 1);
if (rPos < 1 || gPos < 1 || gPos + 1 == colourValue.length()) {
throw new Exception("Invalid colour");
r = Integer.parseInt(colourValue.substring(0, rPos));
g = Integer.parseInt(colourValue.substring(rPos + 1, gPos));
b = Integer.parseInt(colourValue.substring(gPos + 1));
if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) {
throw new Exception("Invalid colour");
return new Color(r,g,b);
catch(Exception e) {
return new Color(0,0,0);
}Francois -
When-Timer-Expired goes back to form
Got a problem in my application where I have a timer on my for which requery's everytime it expires. However if I am in another application e.g. Windows Nt Explorer every time the timer expires control goes back to the form.
Does any one have any ideas??Try closing Mail App in Multitask Window
1. Double tap the home button to bring up the multi-tasking view
2. Swipe up on the screenshot of the Mail app to close
3. The app will fly off the screen
4. Test Mail again
Maybe you are looking for
-
Moving Numbers Spreadsheet to IOS
How does one move Numbers spreadsheets from a MacBook Pro (Numbers) to an iPad? The iPad has Pages but I cannot locate an IOS Numbers application on the iPad. Does something have to be purchased or added to the iPad? Thank you.
-
Unlock User and Reset Password via DB
Hi, I've a SAP FI running on Oracle. I have the SAP ID but no password. I've the access to the Oracle DB. How do I unlock the ID and reset the password via the DB. Please advise. TIA ! Desmond
-
IPTC Headline vs IPTC Object Name
I'm just curious.... Everything I've read about using IPTC fields recommends that we use HEADLINE for the short descriptive caption. And that OBJECT NAME be reserved for a more technical reference. Yet, I see that iPhoto uses the Object Name.... Do w
-
Photoshop Elements FAQ subforum (right panel)
I am finding that a lot of questions asked in the forum are very well answered in that subforum. The problem is that probably most forum users have not noticed the link, especially new forum visitors. My question is : half of those faqs would need so
-
Reboot while communicating over GPIB
I have a fairly simple program to control an Alessi 6100 scope using GPIB (PCI-GPIB). It seems to work ok, but randomly while its working, the whole computer will just reboot and when it starts up again, I get a message saying "The system recovered f