|
|
|
Felix Massem
|
Hi i have a problem i have a bpel process which just reads data from files and dumps it into a database table. From this it will be polled and a bigger process with sub processes begins to store informations into different tables. First i tested it with only some files but now i have to test it with 2000 and later 20000 files.
Here my problem starts because at the beginning everything runs quite fast but after a while its getting slower and slower until i get the following error. Also after i am undeploying my project the full amount of connections to the database are still there. Is there any way i can release them while the process is running? I use Glassfish 2.1 Milestone 2 with the components given from this milestone greetings Felix RAR5117 : Failed to obtain/create connection from connection pool [ AND ]. Reason : In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections. RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.] Error occured while executing sql.Reason: Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections. SQLState: null ErrorCode: 0 java.sql.SQLException: Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections. at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115) at org.glassfish.openesb.databasebc.InboundMessageProcessor.getDatabaseConnection(InboundMessageProcessor.java:1023) at org.glassfish.openesb.databasebc.InboundMessageProcessor.getDataAccessObject(InboundMessageProcessor.java:590) at org.glassfish.openesb.databasebc.InboundMessageProcessor.processInOnly(InboundMessageProcessor.java:392) at org.glassfish.openesb.databasebc.InboundMessageProcessor.execute(InboundMessageProcessor.java:316) at org.glassfish.openesb.databasebc.InboundMessageProcessor.run(InboundMessageProcessor.java:233) at java.lang.Thread.run(Thread.java:619) Unexpected exception Occured while processing the MEP. javax.jbi.messaging.MessagingException: Error occured while executing sql.Reason: Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections. SQLState: null ErrorCode: 0 at org.glassfish.openesb.databasebc.InboundMessageProcessor.getDataAccessObject(InboundMessageProcessor.java:645) at org.glassfish.openesb.databasebc.InboundMessageProcessor.processInOnly(InboundMessageProcessor.java:392) at org.glassfish.openesb.databasebc.InboundMessageProcessor.execute(InboundMessageProcessor.java:316) at org.glassfish.openesb.databasebc.InboundMessageProcessor.run(InboundMessageProcessor.java:233) at java.lang.Thread.run(Thread.java:619) Caused by: java.sql.SQLException: Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections. at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115) at org.glassfish.openesb.databasebc.InboundMessageProcessor.getDatabaseConnection(InboundMessageProcessor.java:1023) at org.glassfish.openesb.databasebc.InboundMessageProcessor.getDataAccessObject(InboundMessageProcessor.java:590) ... 4 more RAR5117 : Failed to obtain/create connection from connection pool [ AND ]. Reason : In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections. RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.] |
|
Pavan Veeravarapu
|
Hi Felix,
Can you tell us which database you are using. If you can send your project, it would be helpful for us to analyze the problem. Thanks, Pavan Veeravarapu. Felix Massem wrote: > Hi i have a problem i have a bpel process which just reads data from files > and dumps it into a database table. From this it will be polled and a bigger > process with sub processes begins to store informations into different > tables. First i tested it with only some files but now i have to test it > with 2000 and later 20000 files. > > Here my problem starts because at the beginning everything runs quite fast > but after a while its getting slower and slower until i get the following > error. > > Also after i am undeploying my project the full amount of connections to the > database are still there. > Is there any way i can release them while the process is running? > > I use Glassfish 2.1 Milestone 2 with the components given from this > milestone > > greetings Felix > > RAR5117 : Failed to obtain/create connection from connection pool [ AND ]. > Reason : In-use connections equal max-pool-size and expired max-wait-time. > Cannot allocate more connections. > RAR5114 : Error allocating connection : [Error in allocating a connection. > Cause: In-use connections equal max-pool-size and expired max-wait-time. > Cannot allocate more connections.] > Error occured while executing sql.Reason: Error in allocating a connection. > Cause: In-use connections equal max-pool-size and expired max-wait-time. > Cannot allocate more connections. SQLState: null ErrorCode: 0 > java.sql.SQLException: Error in allocating a connection. Cause: In-use > connections equal max-pool-size and expired max-wait-time. Cannot allocate > more connections. > at > com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115) > at > org.glassfish.openesb.databasebc.InboundMessageProcessor.getDatabaseConnection(InboundMessageProcessor.java:1023) > at > org.glassfish.openesb.databasebc.InboundMessageProcessor.getDataAccessObject(InboundMessageProcessor.java:590) > at > org.glassfish.openesb.databasebc.InboundMessageProcessor.processInOnly(InboundMessageProcessor.java:392) > at > org.glassfish.openesb.databasebc.InboundMessageProcessor.execute(InboundMessageProcessor.java:316) > at > org.glassfish.openesb.databasebc.InboundMessageProcessor.run(InboundMessageProcessor.java:233) > at java.lang.Thread.run(Thread.java:619) > Unexpected exception Occured while processing the MEP. > javax.jbi.messaging.MessagingException: Error occured while executing > sql.Reason: Error in allocating a connection. Cause: In-use connections > equal max-pool-size and expired max-wait-time. Cannot allocate more > connections. SQLState: null ErrorCode: 0 > at > org.glassfish.openesb.databasebc.InboundMessageProcessor.getDataAccessObject(InboundMessageProcessor.java:645) > at > org.glassfish.openesb.databasebc.InboundMessageProcessor.processInOnly(InboundMessageProcessor.java:392) > at > org.glassfish.openesb.databasebc.InboundMessageProcessor.execute(InboundMessageProcessor.java:316) > at > org.glassfish.openesb.databasebc.InboundMessageProcessor.run(InboundMessageProcessor.java:233) > at java.lang.Thread.run(Thread.java:619) > Caused by: java.sql.SQLException: Error in allocating a connection. Cause: > In-use connections equal max-pool-size and expired max-wait-time. Cannot > allocate more connections. > at > com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115) > at > org.glassfish.openesb.databasebc.InboundMessageProcessor.getDatabaseConnection(InboundMessageProcessor.java:1023) > at > org.glassfish.openesb.databasebc.InboundMessageProcessor.getDataAccessObject(InboundMessageProcessor.java:590) > ... 4 more > RAR5117 : Failed to obtain/create connection from connection pool [ AND ]. > Reason : In-use connections equal max-pool-size and expired max-wait-time. > Cannot allocate more connections. > RAR5114 : Error allocating connection : [Error in allocating a connection. > Cause: In-use connections equal max-pool-size and expired max-wait-time. > Cannot allocate more connections.] > > -- Pavan Veeravarapu Open ESB Community http://open-esb.org --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
ubervelo
|
In reply to this post
by Felix Massem
I had / have similar problem in that I observed the same behavior and got the same error condition. I modified the Max Connection Usage count in the connection pool to 100 (as an experiment) and the error condition went away. However, I still see the performance slowly degrade until eventually it is consuming the entire cpu and memory allocation and cannot process anything. One more observation was that when calling stored procedures I also got an error that the max cursors had been exceeded. The Max Connection Usage work around also solved this problem. Seems that closing the connection resets some things. The database I am using is Oracle. I also notice that when my process instances have completed, the data involved in the transaction is not visible (ie updates don't seem to be there when queried by another user) until several minutes (5-15) after the process actually completed. The number of transactions that can not be seen seems to be relative to the value I place in Max Connection Usage. Seems to me there is some issue with the way transactions are being managed (commit logic / transaction isolation, etc) by the BPEL / Database BC and likely the associated resources (ie memory). My BPEL processes are similar to those described below, in that I am loading data from files into Oracle tables, selecting from those tables and updating other tables in another database instance. I am testing with loads of around 40,000 records per day. And it seems that is the limit before a restart (kill -9) is required.
|
||||||||||||||||
|
Felix Massem
|
In reply to this post
by Pavan Veeravarapu
Sorry for my late answer, but i was out of office for the last week.
I am using MySql 5.0.24a-community-nt. Unfortunately i can“t send you my project because of company restrictions :-( But after all i cleaned up and removed all loops in my project to test it with a single record for each poll ( every 100 ms). This works really fine if i store 25 records in a folder each time but not if i increase the number of files to 100. Than he reads and processes the first 100 something very well but after storing the next 100 files in the folder it crashes with the same error. Thank you for your help and greetings Felix
|
||||||||||||||||
|
Felix Massem
|
In reply to this post
by ubervelo
Thanks for your help. I will try this out but my projectleader likes the number of connections as low as possible. Also i will install the new Glassfish ESB Rc2 to see wether this helps or not.
If you have any other ideas how to resolve the problem just tell me i am open for any help :-) Greetings Felix
|
||||||||||||||||
|
Attila Szilagyi
|
In reply to this post
by Felix Massem
Hello Everybody,
It seems i've ran into a problem like this too. In my current scenario there are some scheduled database procedure calls (one is executing in every second, the others are triggered in every 20 seconds) and some user initiated operations which execute some prepared statements. Everything goes well for about 2 hours then i get this exception (randomly one of the database operations raises the maximum open cursors exceeded error): [#|2009-11-03T12:14:52.430+0100|SEVERE|sun-appserver2.1|sun-database-binding.org.glassfish.openesb.databasebc.OutboundMessageProcessor|_ThreadID=43;_ThreadName=pool-7-thread-7;Cont
ext=context;_RequestID=3698469d-34fe-4dd5-93a8-0e22a87ad6fd;|Failed to write message:.
java.lang.Exception: Failed to denormalize message.
at org.glassfish.openesb.databasebc.OutboundMessageProcessor.processInOut(OutboundMessageProcessor.java:583)
at org.glassfish.openesb.databasebc.OutboundMessageProcessor.execute(OutboundMessageProcessor.java:276)
at org.glassfish.openesb.databasebc.OutboundMessageProcessor.run(OutboundMessageProcessor.java:171)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: Error occured while executing SQL.select TIME, COMMANDID, RESULTID, STATUS, EQUIPMENTID, MESSAGEID from COMMANDSERVICECOMMANDRESULTS WHERE Message
ID in (Select MessageID from commandserviceexecutedmessages where ClientID=?) Reason: ORA-01000: maximum open cursors exceeded
SQLState: 72000 ErrorCode: 1000
at org.glassfish.openesb.databasebc.OutboundMessageProcessor.executeOutboundSQLSelect(OutboundMessageProcessor.java:1385)
at org.glassfish.openesb.databasebc.OutboundMessageProcessor.processInOut(OutboundMessageProcessor.java:575)
... 5 more
|#]
From this point every database operation fails with this error message. Only a domain restart helps. I've tried to adjust the connection pool's connection related parameters, but it haven't helped. Have you met with this exception? Regards, Attila |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |