RE: When user hits STOP..any way to trap that and terminate an ongoin g request..
Title: Ayuda Kevin, tough I value the trouble you've been taking to hack around this orion bug, it is a BUG, and therefore should be corrected. AFAIK, this is the only exploit that orion exposes, and it is VERY problematic. DoS attacks are very easy to perform... just pick any "heavy" page on a site, open a socket, send a very short HTTP header, then drop the connection. Do it quickly and orion will choke up. Most IDS and Firewalls can't block this kind of attack with their default settings, and when programmed to block, they cannot be efficient. -Original Message-From: Duffey, Kevin [mailto:[EMAIL PROTECTED]]Sent: Lunes, 13 de Agosto de 2001 16:23To: Orion-InterestSubject: When user hits STOP..any way to trap that and terminate an ongoin g request.. Hi al, I am almost positive the answer is no, but I thought I'd see if anyone has come up with a solution. All too often, we have some users that submit a large query, then hit the STOP button on the browser, then change something and submit again. In the meantime, their original query is still executing on the server-side. Sure..Orion throws an exception when it tries to send the response back and the connection to the browser is gone. But I am wondering if there is any way at all to just kill that particular request. Like..is there some way the app server or web server can send pings every say, 100ms to the browser to make sure its connection is still alive..and if not, just kill the request in some manner. Perhaps by having a special interface that an application can implement, so that a particular method can be called if the server detects that the connection to the browser is dead before the response has gone back. In this way, that method call can get ahold of the session, and perhaps get ahold of a connection being used, close it, etc. Ofcourse, you can use some client-side javascript to "disable" a button after its been clicked. We have done this, and we also inserted a "transition" page in particular areas where long queries might occur. In this case, the user sees an animated gif and a message that tells them not to hit stop or back. Ofcourse..you're still going to get those users that do this. My personal opinion is that if they call in, we tell them they are stupid, they should unplug their computer and quit their job because they can't follow instructions. Ofcourse..that wont fly, especially if they are a big money client. Besides, its ethically wrong to screw your clients over. ;) So, one possible idea I have had is to do the following. Each user has a session when they log in. Upon any request, a "flag" is set in the session of that user, indicating a transaction is starting. If the user hits STOP, then submits while that transaction is still going on, the server will see the flag is set, and send back a response indicating that a transaction is currently happening and they have to wait for it to be done before another submit can occur. There is a plus side to this..it prevents any user to doing more than one thing. The down side is, it is possible using the File - New - Window to open up another window with the same cookie/sessionID and the user could actually go to a different module and do MORE work at the same time. This would allow, for example a large query to be performing in one module and they could go do some work in another module. My method of a flag would prevent this type of multiple-module capability. The solution, ofcourse is to allow one flag per module, thus only one transaction per module could be performed, which is what I intend to implement to at least keep the user experience at a satisfactory level while preventing tons of form submissions from inundating the server. So anyone had this experience and resolve it in some manner? Thanks.
RE: ORA-01000: maximum open cursors exceeded Exception
Denis, the code you were looking at was not posted by me. In the case of ORA-01000 we have a system built entirely with CMP beans and Orion 1.5.2. We have a program, we call the loader, which loads a number of entities into the database after initial database refresh. It is during the execution of the loader, that we get this error. The loader, is doing a lot of ejbCreate() and finds to create the relationships between the entities. So to answer your original question, there is only 1 user. -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of DENNIS STRAIGHT Sent: Tuesday, August 14, 2001 5:45 PM To: Orion-Interest Subject: Re: ORA-01000: maximum open cursors exceeded Exception Then again, it could be normal operation and we just need to increase the number of cursors allowed. This is possible but I doubt it. Setting up the limit seems like a cheap way to fix the problem... for now. How many concurrent users are executing this code? And how long does it take for the error to occur? I also noticed that your closing everything in its own try block inside the finally block. Of course you realize that if the line rs.close(); for example, causes an error (because rs == null for example) then the code would get thrown into the catch block and nothing else would get closed. At the very least I would remove the try - catch that is inside the finally block. Cheers, Dennis Alex Paransky wrote: We are not using any direct connections to the database. We only use CMP beans. So there might be something wrong in the way I am using the beans, or the could be a bug in Orion which is leaving a lot of cursors open. Then again, it could be normal operation and we just need to increase the number of cursors allowed. -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of The elephantwalker Sent: Tuesday, August 14, 2001 10:55 AM To: Orion-Interest Subject: RE: ORA-01000: maximum open cursors exceeded Exception Here's a bit of code I use alot in ejb's. The handler interface only has one method, processResultSet. The getDBConnection is a helper method. Notice how the connection, resultset and statement are closed. If these are'nt executed in the proper order, and within a finally clause, oracle will glorck on you with the 01000 error. If you have many cmp beans, it could be that your maximum's for open cursors is like 50 or so. It should be up around 300. This can be modified in the ora.ini file. Regards, the elephantwalker private void executeStatement(String statement, Handler handler) throws RemoteException { Connection con = null; ResultSet rs = null; Statement stmt = null; try{ con = getDBConnection(); stmt = con.createStatement(); rs = stmt.executeQuery(statement); handler.processResultSet(rs); } catch (Exception ex){ throw new EJBException( ex.getMessage()); } finally { try{ rs.close(); stmt.close(); con.close(); rs = null; stmt = null; con = null; } catch (SQLException se){ throw new EJBException( se.getMessage()); } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kesav Kumar Sent: Tuesday, August 14, 2001 10:26 AM To: Orion-Interest Subject: RE: ORA-01000: maximum open cursors exceeded Exception This is because you have too many opened statements and Resultsets. Make sure that you close your statements and resultsets properly. Try to debug the jdbc activity by setting the following properties. jdbc.debug=true debug.jdbc.check=true jdbc.connection.debug=true Kesav Kumar Kolla Voquette Inc 650 356 3740(W) 510 889 6840(R) VoquetteDelivering Sound Information -Original Message- From: Alex Paransky [mailto:[EMAIL PROTECTED]] Sent: Monday, August 13, 2001 6:51 PM To: Orion-Interest Subject: ORA-01000: maximum open cursors exceeded Exception We have been using the server more frequently now, and are getting this exception from time to time. Does any one know why does this exception occur and what to do about it? Could I be doing something wrong in my CMP 2.0 Entity Beans? I am using Orion Server 1.5.2. Thanks. -AP_ Embedded Exception - com.evermind.server.rmi.OrionRemoteException: Database error: at InterestEntityHome_EntityHomeWrapper532.findExistingEntity(InterestEntityHom e_EntityHomeWrapper532.java:54) at InterestEntityHome_EntityHomeWrapper532.findByPrimaryKey(InterestEntityHome_ EntityHomeWrapper532.java:269) at com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea n.getValue(InterestManagementServiceBean.java:229) at
Re[2]: ORA-01000: maximum open cursors exceeded Exception
Hello Alex, Not a long time ago I ran with that problem using orion 1.4.5. It was at the university, and we were using a central DB server for all the courses. The problem was that I was using a lot of EJB (25+) in an implementation of TPC-W benchmark (a e-commerce like app), but the DBA configured ORACLE to allow a maxium number of open cursors that was less that the number I needed. So, contact your DBA. BTW, if you are working with oracle, is very useful to subscribe into otn.oracle.com. You can find all the manuals online. My most used link is http://technet.oracle.com/doc/server.815/a67785/toc.htm (Oracle Errors). Is for 8.1.5, but is still current. Tuesday, August 14, 2001, 5:58:47 PM, you wrote: AP We are not using any direct connections to the database. We only use CMP AP beans. So there might be something wrong in the way I am using the beans, AP or the could be a bug in Orion which is leaving a lot of cursors open. Then AP again, it could be normal operation and we just need to increase the number AP of cursors allowed. -- Best regards, Rafaelmailto:[EMAIL PROTECTED]
FW: ORA-01000: maximum open cursors exceeded Exception
resend, first one didn't catch... -Original Message- From: The elephantwalker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 12:46 AM To: Orion-Interest Subject: RE: ORA-01000: maximum open cursors exceeded Exception Alex and Dennis, This is from experience with oracle. The try/catch in the finally is necessary for these statements, or they won't compile. Also, it looks like Alex's problem has to do with the number of open cursors with cmp's and orion. I would be interested in the cmp.size() for a findAll() on this just to see what the maximum problem could be. It could be that his maximum cursor can't handle 1000 simulataneous open cursors, even though his application is regularly producing this activity. If its a small number of cmp's, then Karl and Magnus need to know...its a bug. Regards, the elephantwalker -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of DENNIS STRAIGHT Sent: Tuesday, August 14, 2001 5:45 PM To: Orion-Interest Subject: Re: ORA-01000: maximum open cursors exceeded Exception Then again, it could be normal operation and we just need to increase the number of cursors allowed. This is possible but I doubt it. Setting up the limit seems like a cheap way to fix the problem... for now. How many concurrent users are executing this code? And how long does it take for the error to occur? I also noticed that your closing everything in its own try block inside the finally block. Of course you realize that if the line rs.close(); for example, causes an error (because rs == null for example) then the code would get thrown into the catch block and nothing else would get closed. At the very least I would remove the try - catch that is inside the finally block. Cheers, Dennis Alex Paransky wrote: We are not using any direct connections to the database. We only use CMP beans. So there might be something wrong in the way I am using the beans, or the could be a bug in Orion which is leaving a lot of cursors open. Then again, it could be normal operation and we just need to increase the number of cursors allowed. -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of The elephantwalker Sent: Tuesday, August 14, 2001 10:55 AM To: Orion-Interest Subject: RE: ORA-01000: maximum open cursors exceeded Exception Here's a bit of code I use alot in ejb's. The handler interface only has one method, processResultSet. The getDBConnection is a helper method. Notice how the connection, resultset and statement are closed. If these are'nt executed in the proper order, and within a finally clause, oracle will glorck on you with the 01000 error. If you have many cmp beans, it could be that your maximum's for open cursors is like 50 or so. It should be up around 300. This can be modified in the ora.ini file. Regards, the elephantwalker private void executeStatement(String statement, Handler handler) throws RemoteException { Connection con = null; ResultSet rs = null; Statement stmt = null; try{ con = getDBConnection(); stmt = con.createStatement(); rs = stmt.executeQuery(statement); handler.processResultSet(rs); } catch (Exception ex){ throw new EJBException( ex.getMessage()); } finally { try{ rs.close(); stmt.close(); con.close(); rs = null; stmt = null; con = null; } catch (SQLException se){ throw new EJBException( se.getMessage()); } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kesav Kumar Sent: Tuesday, August 14, 2001 10:26 AM To: Orion-Interest Subject: RE: ORA-01000: maximum open cursors exceeded Exception This is because you have too many opened statements and Resultsets. Make sure that you close your statements and resultsets properly. Try to debug the jdbc activity by setting the following properties. jdbc.debug=true debug.jdbc.check=true jdbc.connection.debug=true Kesav Kumar Kolla Voquette Inc 650 356 3740(W) 510 889 6840(R) VoquetteDelivering Sound Information -Original Message- From: Alex Paransky [mailto:[EMAIL PROTECTED]] Sent: Monday, August 13, 2001 6:51 PM To: Orion-Interest Subject: ORA-01000: maximum open cursors exceeded Exception We have been using the server more frequently now, and are getting this exception from time to time. Does any one know why does this exception occur and what to do about it? Could I be doing something wrong in my CMP 2.0 Entity Beans? I am using Orion Server 1.5.2. Thanks. -AP_ Embedded Exception - com.evermind.server.rmi.OrionRemoteException: Database error: at InterestEntityHome_EntityHomeWrapper532.findExistingEntity(InterestEntityHom
how to unsubscribe.
would somebody tell me how to unsubscribe to this group. tried but failed.
RE: ORA-01000: maximum open cursors exceeded Exception
It is a fairly small number of objects, but about 30 CMP's or so. At the time we are loading general things into our database (Lookup beans) such as Languages, States, Countries, Gender, Income, Interests, and other such objects which later act as Lookup or relational objects. It could very well be, that we are running out of cursors on the Oracle's side, and we need to increase the count. When a user is created, this is when the actual problem occurs, we are doing ejbFinds all over the place for all of these entities. So for example, to create a user, there would be an EJB find executed on Languages, States, Countries, Gender, Income, Interests, and a whole bunch of other things. How long do cursors stay open? Is Orion using cursors? When do they get closed? It is quite silly at this point, but we are not using transactions for our Loads, so there is A LOT OF UPDATE/SELECT type of calls going out to the database. I am sure, if we wrap all the loaders into a single transaction this problem might go away. At this point, I am not sure if I want to open a bug, since it's so difficult to reproduce, and I am not even sure if it is a bug. -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of The elephantwalker Sent: Wednesday, August 15, 2001 2:56 PM To: Orion-Interest Subject: FW: ORA-01000: maximum open cursors exceeded Exception resend, first one didn't catch... -Original Message- From: The elephantwalker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 12:46 AM To: Orion-Interest Subject: RE: ORA-01000: maximum open cursors exceeded Exception Alex and Dennis, This is from experience with oracle. The try/catch in the finally is necessary for these statements, or they won't compile. Also, it looks like Alex's problem has to do with the number of open cursors with cmp's and orion. I would be interested in the cmp.size() for a findAll() on this just to see what the maximum problem could be. It could be that his maximum cursor can't handle 1000 simulataneous open cursors, even though his application is regularly producing this activity. If its a small number of cmp's, then Karl and Magnus need to know...its a bug. Regards, the elephantwalker -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of DENNIS STRAIGHT Sent: Tuesday, August 14, 2001 5:45 PM To: Orion-Interest Subject: Re: ORA-01000: maximum open cursors exceeded Exception Then again, it could be normal operation and we just need to increase the number of cursors allowed. This is possible but I doubt it. Setting up the limit seems like a cheap way to fix the problem... for now. How many concurrent users are executing this code? And how long does it take for the error to occur? I also noticed that your closing everything in its own try block inside the finally block. Of course you realize that if the line rs.close(); for example, causes an error (because rs == null for example) then the code would get thrown into the catch block and nothing else would get closed. At the very least I would remove the try - catch that is inside the finally block. Cheers, Dennis Alex Paransky wrote: We are not using any direct connections to the database. We only use CMP beans. So there might be something wrong in the way I am using the beans, or the could be a bug in Orion which is leaving a lot of cursors open. Then again, it could be normal operation and we just need to increase the number of cursors allowed. -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of The elephantwalker Sent: Tuesday, August 14, 2001 10:55 AM To: Orion-Interest Subject: RE: ORA-01000: maximum open cursors exceeded Exception Here's a bit of code I use alot in ejb's. The handler interface only has one method, processResultSet. The getDBConnection is a helper method. Notice how the connection, resultset and statement are closed. If these are'nt executed in the proper order, and within a finally clause, oracle will glorck on you with the 01000 error. If you have many cmp beans, it could be that your maximum's for open cursors is like 50 or so. It should be up around 300. This can be modified in the ora.ini file. Regards, the elephantwalker private void executeStatement(String statement, Handler handler) throws RemoteException { Connection con = null; ResultSet rs = null; Statement stmt = null; try{ con = getDBConnection(); stmt = con.createStatement(); rs = stmt.executeQuery(statement); handler.processResultSet(rs); } catch (Exception ex){ throw new EJBException( ex.getMessage()); } finally { try{ rs.close(); stmt.close(); con.close(); rs = null; stmt = null; con = null;