We're having problems running CAS on clustered Tomcat with audit trail enabled.
Once in a while, the connection pool would run out of connections. The behavior is very sporadic and doesn't seem to be load related. We were able to narrow it down to the update statements for the COM_AUDIT table. Seems like at times the two Tomcat nodes will run the statements and they would deadlock which causes the spike in the number of connections in the pool. My biggest suspect right now is that the authentication manager Spring context and audit trail context use each its own TransactionManager - the authentication context uses JpaTransactionManager and the audit trail context uses DataSourceTransactionManager. To resolve this situation I'm trying to utilize JtaTransactionManager. Being just a servlet container, Tomcat does not provide JTA and I have to use third-party implementations - currently testing Atomikos and BTM. The problem that I have with both is that the authentication stops working. No exceptions in the log. Just the following debug message: DEBUG [org.jasig.cas.web.flow.GenerateServiceTicketAction] - <Action 'GenerateServiceTicketAction' completed execution; result is 'error'> although just before that I get the message: INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - <AuthenticationHandler: com.ubm.sso.cas.adapters.jdbc.AutoLoginSearchModeSearchDatabaseAuthenticationHandler successfully authenticated the user which provided the following credentials: [username: [email protected]]> Has anyone experienced this behavior? Any ideas? Thank you, AT. -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
