ERROR Transaction error issuing commit with transaction status active

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

ERROR Transaction error issuing commit with transaction status active

#1

Postby Segi » Tue Oct 15, 2019 8:55 pm

I have logic in my Verj application that goes over a list of part numbers in a table that is displayed on the page (There are about 88 parts at the moment). I pragmatically call a SQL Server 2005 stored procedure which expands each part into a bill of materials (a collection of parts contains within this part number) and do some analysis on it.

When I limit the # of parts that are processed by my logic it runs successfully but if not, I get the error below every single time.

It seems to fail at right under the 3 hour mark (I know that thats a long time but there is a lot of processing to do).

I can post the stored procedure if someone wants

I have set the timeout in the DB to 0 (no timeout) but that has not fixed this error.

I am not sure if this is something that I can correct in Verj or need to fix in the stored procedure. I have already re-written some of the logic in this SP and moved it to a separate SP.

Code: Select all

Tue Oct 15 13:41:21: ERROR Transaction error issuing commit with transaction status active - One or more resources refused to commit (possibly because of a timeout in the resource - see the log for details). This transaction has been rolled back instead.
Tue Oct 15 13:41:21: ERROR com.ebasetech.ufs.kernel.FormTransactionException: Transaction error issuing commit with transaction status active - One or more resources refused to commit (possibly because of a timeout in the resource - see the log for details). This transaction has been rolled back instead.
Tue Oct 15 13:41:21: ERROR Server Error: Transaction error issuing commit with transaction status active - One or more resources refused to commit (possibly because of a timeout in the resource - see the log for details). This transaction has been rolled back instead.
com.ebasetech.ufs.kernel.FormTransactionException: Transaction error issuing commit with transaction status active - One or more resources refused to commit (possibly because of a timeout in the resource - see the log for details). This transaction has been rolled back instead.
	at com.ebasetech.ufs.kernel.TransactionManager.commit(TransactionManager.java:174)
	at com.ebasetech.ufs.kernel.TransactionManager.commitTransaction(TransactionManager.java:534)
	at formservlets.FormProcessingUtil.executeRequest(FormProcessingUtil.java:505)
	at formservlets.EbaseExternalAPIServlet.process(EbaseExternalAPIServlet.java:97)
	at formservlets.EbaseExternalAPIServlet.doPost(EbaseExternalAPIServlet.java:52)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at formservlets.EbaseFilter.processRequest(EbaseFilter.java:254)
	at formservlets.EbaseFilter.performFilter(EbaseFilter.java:181)
	at formservlets.EbaseFilter.doFilter(EbaseFilter.java:100)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:835)
0 x

Steve
Moderator
Moderator
Posts: 414
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

Re: ERROR Transaction error issuing commit with transaction status active

#2

Postby Steve » Wed Oct 16, 2019 1:25 pm

Hi Segi,

Our default timeout is 30 minutes.

This can be changed the Server admin general properties --> transaction manager properties.

This can also overridden in code:

Code: Select all

//set timeout in seconds for subsequent transactions (30 minutes here)
system.transactionManager.setDefaultTransactionTimeout(1800);

// Start a new transaction with the new timeout value
system.transactionManager.commitAndRestartTransaction();
I think this is your problem.

Kind regards

Steve Upton
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

Re: ERROR Transaction error issuing commit with transaction status active

#3

Postby Segi » Wed Oct 16, 2019 5:44 pm

Steve

Thanks,

This will be good to know if I ever need it in the future but I decided to fix the problem itself by rewriting the logic that calls a stored procedure so that it uses a CTE instead which is much much faster.
0 x

Steve
Moderator
Moderator
Posts: 414
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

Re: ERROR Transaction error issuing commit with transaction status active

#4

Postby Steve » Thu Oct 17, 2019 10:26 am

Hi Segi,

Your solution sounds like a very good one. Making it much faster has to be a better option. This way you are not tying up Java Threads with long running processes.

Steve
0 x


Who is online

Users browsing this forum: Google [Bot] and 8 guests