As I said, that is the 3.x behavior and a strong weakness of the CAS 3.x. ticket registry.
It strongly affects the heap size (we had several outages in the past until we set the heap size on all nodes to 10GB). We keep approx. 300.000 tickets in the db (as we use RememberMe) but do not get the errors you get. We are currently using MySQL. Here is the dataSource setting we use in ticketRegistry.xml: <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" p:driverClass="com.mysql.jdbc.Driver" p:jdbcUrl="jdbc:mysql://xxxxxxxxxx/yyyyyyyyyyyy?autoReconnect=true" p:user="your_db_user" p:password="your_db_pw" p:initialPoolSize="5" p:minPoolSize="10" p:maxPoolSize="100" p:acquireIncrement="3" p:acquireRetryAttempts="5" p:acquireRetryDelay="5000" p:checkoutTimeout="20000" p:maxStatementsPerConnection="100" p:maxIdleTimeExcessConnections="7200" p:idleConnectionTestPeriod="3600" p:preferredTestQuery="Select 1“/> In CAS 4.0, the db schema was enhanced, therefore cleaning within the DB should be possible. CAS itself is a low-memory footprint application, therefore we expect to lower the heapsize dramatically when we once upgrade to 4.x. Am 27.10.2013 um 16:55 schrieb David Turner <turner.da...@williamhill.com>: > Hi Robert, > > No connection pool timeouts - the connection is timed out either because of > firewall or the database itself. Looks like there is a lot of idle on the > connection but the pool is configured not to reclaim the connection. > > Seems the whole ticket clean up process takes a long time and the connection > is held open for a long time - we are generating a high load and the no. of > tickets requiring clean up is close to 100k. The scheduler is configured to > run every 30 mins at the moment so maybe we need to look at running this more > frequently. > > How long would you expect the clean up to take - does it need to deserialise > every ticket!! That's going to impact the heap size. > > Appreciate your comments though - good to know there is an active community > > David Turner > Senior Solutions Architect > M: +44 (0)784 1784392 > T: +44 (0)113 3974625 > E: turner.da...@williamhill.com > Skype: djturner90 > William Hill Online, 2 City Walk, Leeds, LS11 9AR > > ________________________________________ > From: Robert Oschwald <robertoschw...@googlemail.com> > Sent: 27 October 2013 15:22 > To: cas-dev@lists.jasig.org > Subject: Re: [cas-dev] CAS TicketRegistry Cleanup - connection timeout > > No, JPALockingStrategy takes care of that. > It seems your connection runs into a pooling timeout, therefore a check of > your connection pool settings would help. > > Am 27.10.2013 um 13:55 schrieb David Turner <turner.da...@williamhill.com>: > >> Hi Robert, >> >> So this seems highly inefficient as the TicketGrantingTicket table should >> hold this info without need to deserialise in JVM - much better to get the >> db to do the heavy lifting and leave JVM handling authentication requests. >> >> Do you create a separate HA cluster just to handle ticket cleanup? >> >> David Turner >> Senior Solutions Architect >> M: +44 (0)784 1784392 >> T: +44 (0)113 3974625 >> E: turner.da...@williamhill.com >> Skype: djturner90 >> William Hill Online, 2 City Walk, Leeds, LS11 9AR >> >> ________________________________________ >> From: Robert Oschwald <robertoschw...@googlemail.com> >> Sent: 27 October 2013 11:00 >> To: cas-dev@lists.jasig.org >> Subject: Re: [cas-dev] CAS TicketRegistry Cleanup - connection timeout >> >> Whats your DB and CAS Server version? >> Send your pool settings please. >> >> With CAS 3.x, all tickets need to be deserialized to figure out which ones >> are expired. >> But your problem seems to be connection pool settings related. >> >> >> >>> Am 27.10.2013 um 11:47 schrieb "David" <turner.da...@williamhill.com>: >>> >>> Hi, >>> >>> We are getting a CAS ticket cleanup problem - the connection is closed. I >>> have confirmed the JDBC connection pool settings and the pool manager will >>> reclaim connections after 600 seconds so I suspect the database or network >>> are at fault. >>> >>> We are using the JPATicketRegistry across a TC cluster - locking worked >>> fine but when there are a large number of tickets to clean the connection >>> closed issue occurs. Why does the CAS app need to take so long to clear >>> down the ticketgranting table? Surely it can execute a delete from where >>> SQL statement and use a predicate to determine if the ticket should be >>> purged or not. Why the need to load into memory? This is a perf overhead >>> IMO. >>> >>> Any insight into this or if other have experienced similar problems - >>> greatly appreciated >>> -- >>> You are currently subscribed to cas-dev@lists.jasig.org as: >>> robertoschw...@googlemail.com >>> To unsubscribe, change settings or access archives, see >>> http://www.ja-sig.org/wiki/display/JSG/cas-dev >>> <TicketCleanupException_DBConnection.txt> >> >> -- >> You are currently subscribed to cas-dev@lists.jasig.org as: >> turner.da...@williamhill.com >> To unsubscribe, change settings or access archives, see >> http://www.ja-sig.org/wiki/display/JSG/cas-dev >> >> Confidentiality: The contents of this e-mail and any attachments transmitted >> with it are intended to be confidential to the intended recipient; and may >> be privileged or otherwise protected from disclosure. If you are not an >> intended recipient of this e-mail, do not duplicate or redistribute it by >> any means. Please delete it and any attachments and notify the sender that >> you have received it in error. This e-mail is sent by a William Hill PLC >> group company. The William Hill group companies include, among others, >> William Hill PLC (registered number 4212563), William Hill Organization >> Limited (registered number 278208), William Hill US HoldCo Inc, WHG >> (International) Limited (registered number 99191) and WHG Trading Limited >> (registered number 101439). Each of William Hill PLC, William Hill >> Organization Limited is registered in England and Wales and has its >> registered office at Greenside House, 50 Station Road, Wood Green, London >> N22 7TP. William Hill U.S. HoldCo, Inc. is 160 Greentree Drive, Suite 101, >> Dover 19904, Kent, Delaware, United States of America. Each of WHG >> (International) Limited and WHG Trading Limited is registered in Gibraltar >> and has its registered office at 6/1 Waterport Place, Gibraltar. Unless >> specifically indicated otherwise, the contents of this e-mail are subject to >> contract; and are not an official statement, and do not necessarily >> represent the views, of William Hill PLC, its subsidiaries or affiliated >> companies. Please note that neither William Hill PLC, nor its subsidiaries >> and affiliated companies can accept any responsibility for any viruses >> contained within this e-mail and it is your responsibility to scan any >> emails and their attachments. William Hill PLC, its subsidiaries and >> affiliated companies may monitor e-mail traffic data and also the content of >> e-mails for effective operation of the e-mail system, or for security, >> purposes.. >> >> -- >> You are currently subscribed to cas-dev@lists.jasig.org as: >> robertoschw...@googlemail.com >> To unsubscribe, change settings or access archives, see >> http://www.ja-sig.org/wiki/display/JSG/cas-dev >> > > > -- > You are currently subscribed to cas-dev@lists.jasig.org as: > turner.da...@williamhill.com > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-dev > > Confidentiality: The contents of this e-mail and any attachments transmitted > with it are intended to be confidential to the intended recipient; and may be > privileged or otherwise protected from disclosure. If you are not an intended > recipient of this e-mail, do not duplicate or redistribute it by any means. > Please delete it and any attachments and notify the sender that you have > received it in error. This e-mail is sent by a William Hill PLC group > company. The William Hill group companies include, among others, William Hill > PLC (registered number 4212563), William Hill Organization Limited > (registered number 278208), William Hill US HoldCo Inc, WHG (International) > Limited (registered number 99191) and WHG Trading Limited (registered number > 101439). Each of William Hill PLC, William Hill Organization Limited is > registered in England and Wales and has its registered office at Greenside > House, 50 Station Road, Wood Green, London N22 7TP. William Hill U.S. HoldCo, > Inc. is 160 Greentree Drive, Suite 101, Dover 19904, Kent, Delaware, United > States of America. Each of WHG (International) Limited and WHG Trading > Limited is registered in Gibraltar and has its registered office at 6/1 > Waterport Place, Gibraltar. Unless specifically indicated otherwise, the > contents of this e-mail are subject to contract; and are not an official > statement, and do not necessarily represent the views, of William Hill PLC, > its subsidiaries or affiliated companies. Please note that neither William > Hill PLC, nor its subsidiaries and affiliated companies can accept any > responsibility for any viruses contained within this e-mail and it is your > responsibility to scan any emails and their attachments. William Hill PLC, > its subsidiaries and affiliated companies may monitor e-mail traffic data and > also the content of e-mails for effective operation of the e-mail system, or > for security, purposes.. > > -- > You are currently subscribed to cas-dev@lists.jasig.org as: > robertoschw...@googlemail.com > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-dev > -- You are currently subscribed to cas-dev@lists.jasig.org as: arch...@mail-archive.com To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev