<div dir="ltr"><font face="arial, sans-serif">hello all,</font><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">We are experiencing some issues in our environment revolving around a postgres database used for CAS session information. We recently switched from Hibernate to the JDBCStorageService, and are seeing many retry exceptions. We have at least two load balanced Shibboleth 4 IdP instances writing to the postgres db at any time.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Here is the error:</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">**********</font></div>ERROR<br>[net.shibboleth.idp.cas.flow.impl.GrantServiceTicketAction:227]<br>Profile Action GrantServiceTicketAction: Failed granting service ticket due to error.<br>java.lang.RuntimeException: Failed to store ticket ST-<ticket> at net.shibboleth.idp.cas.ticket.impl.AbstractTicketService.store(AbstractTicketService.java:189)<br>Caused by:<br>java.io.IOException: org.postgresql.util.PSQLException: ERROR: could not serialize access due to read/write dependencies among transactions Detail: Reason code: Canceled on identification as a pivot, during commit attempt. Hint: The transaction might succeed if retried. at net.shibboleth.plugin.storage.jdbc.impl.JDBCStorageService.create(JDBCStorageService.java:595) Caused by: org.postgresql.util.PSQLException: ERROR: could not serialize access due to read/write dependencies among transactions Detail: Reason code: Canceled on identification as a pivot, during commit attempt. Hint: The transaction might succeed if retried. at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)<div><span class="gmail-t" style="color:rgb(60,68,77);font-family:"Splunk Platform Mono",Inconsolata,Consolas,"Droid Sans Mono",Monaco,"Courier New",Courier,monospace;white-space:pre-wrap"><span class="gmail-t">******</span></span></div><div><span class="gmail-t" style="color:rgb(60,68,77);font-family:"Splunk Platform Mono",Inconsolata,Consolas,"Droid Sans Mono",Monaco,"Courier New",Courier,monospace;white-space:pre-wrap"><span class="gmail-t"><br></span></span></div>We are considering turning on localLocking in the JDBCStorage service, as well as configuringing the maxConnLifetimeMillis (change setting to 30min) and validationQueryTimeout (change setting to 5 sec) properties in the Commons DBCP Pool configuration.<div><br><div><font face="arial, sans-serif">Has anyone had any experience with enabling any of these properties? Any performance/other issues, etc?</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">here is our JDBCStorageService configuration</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">***********</font></div><div><bean id="custom.JDBCStorageService" <br>      parent="shibboleth.JDBCStorageService"<br>      p:cleanupInterval="%{idp.storage.cleanupInterval:PT10M}"<br>      p:dataSource-ref="umd.JDBCStorageService.DataSource"/></div><div><br><bean id="custom.JDBCStorageService.DataSource"<br>      class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close" lazy-init="true"<br>      p:driverClassName="org.postgresql.Driver"<br>      p:url="<url>"<br>      p:password="<pass>" /><br></div><div><font face="arial, sans-serif">***********</font></div></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Thanks for any insights</font></div></div>