Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle 'deadlock' error on deleteCartItems API call #465

Open
stuartpullinger opened this issue May 19, 2020 · 0 comments
Open

Oracle 'deadlock' error on deleteCartItems API call #465

stuartpullinger opened this issue May 19, 2020 · 0 comments
Assignees
Labels

Comments

@stuartpullinger
Copy link
Contributor

The server.log on Diamond's Topcat is reporting an Oracle error when a CartItem is deleted via the API. (I can't see any evidence of this problem on ISIS' Topcat). 2 errors appear in the logs (and have been for over a year):

[2020-05-15T18:48:39.358+0100] [Payara 4.1] [WARNING] [AS-EJB-00056] [javax.enterprise.ejb.container] [tid: _ThreadID=244207 _ThreadName=http-thread-pool::http-listener-2(72)] [timeMillis: 1589564919358] [levelValue: 900] [[
  A system exception occurred during an invocation on EJB UserResource, method: public javax.ws.rs.core.Response org.icatproject.topcat.web.rest.UserResource.deleteCartItems(java.lang.String,java.lang.String,java.lang.String) throws org.icatproject.topcat.exceptions.TopcatException,java.net.MalformedURLException,java.text.ParseException]]

Followed by:

[2020-05-15T18:48:39.358+0100] [Payara 4.1] [WARNING] [] [javax.enterprise.ejb.container] [tid: _ThreadID=244207 _ThreadName=http-thread-pool::http-listener-2(72)] [timeMillis: 1589564919358] [levelValue: 900] [[

javax.ejb.EJBException
        at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:750)
...
        at org.icatproject.topcat.web.rest.__EJB31_Generated__UserResource__Intf____Bean__.deleteCartItems(Unknown Source)
...
        at org.icatproject.topcat.filter.CacheControlFilter.doFilter(CacheControlFilter.java:52)
...
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.4.qualifier): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00060: deadlock detected while waiting for resource

Error Code: 60
Call: DELETE FROM CARTITEM WHERE (ID = ?)
        bind => [1 parameter bound]
Query: DeleteObjectQuery(org.icatproject.topcat.domain.CartItem@3f1f6116)
...
        at org.icatproject.topcat.web.rest.UserResource.deleteCartItems(UserResource.java:559)
...

I'm not sure yet which bit of the frontend is calling this API endpoint - I haven't been able to recreate the circumstances to log the error. I suspect, though I'm not sure, that it may degrade response times when this error is logged. On the backend, the CartItem Entity does not define a Delete SQL query. The SQL above must be generated by the Java Persistence layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant