title: Tomcat PersistenceManager: what is the use case for setting minIdleSwap / maxIdleSwap values?
body: <p>I just learned about the tomcat PersistenceManager today. I was researching why my declarative security model was timing out logins after 1 minute on our dev and prod servers which have a PersistenceManager configured, but NOT on two other servers that do not have a PersistenceManager configured.</p>
  
  <p>I discovered that changing maxIdleSwap from "30" to "3600" and also adding a minIdleSwap of "1800" caused the timeout to be 30 minutes like I want it to be (as set in web.xml).</p>
  
  <p>So, in attempting to determine why the original admin set this up this way, I did some research, but I cannot determine what the intention was.</p>
  
  <p>I would like to ask: what possible use cases exist for wanting tomcat sessions to be persisted to disk every 30 seconds? Note that when tomcat shuts downs and restarts, the Persistence Manager automatically persists sessions to disk (unless you manually tell it not to).</p>
  
  <p>Perhaps this will give me some insight into why it was set up this way. So far, all my research into the issue leads me to believe that most people set this up with the default, which is to disable min and max IdleSwap, although I've seen a few cases where people set these values to 0 so that every request causes persistence of the session.</p>
  
  <p>Thanks.</p>