Summary: | PersistentManager.minIdleSwap=-1 does not disable swapping as documented. | ||
---|---|---|---|
Product: | Tomcat 9 | Reporter: | Holger Sunke <holger.sunke> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 9.0.5 | ||
Target Milestone: | ----- | ||
Hardware: | PC | ||
OS: | Windows NT | ||
Attachments: | Patch against Apache Tomcat trunk r1826332 |
Description
Holger Sunke
2018-03-09 12:03:25 UTC
Thanks for the report and the patch. Fixed in: - trunk for 9.0.7 onwards - 8.5.x for 8.5.30 onwards - 8.0.x for 8.0.51 onwards - 7.0.x for 7.0.86 onwards The old behaviour would guard against too many sessions in memory. The new one could lead to memory overload. Maybe we should add a warning, if max sessions limit was reached? That is not correct. Look at how maxActiveSessions is used, particularly in createSession. Ok, I spoke without looking at the code. I believe you are referring to if ((maxActiveSessions >= 0) && (getActiveSessions() >= maxActiveSessions)) { rejectedSessions++; throw new TooManyActiveSessionsException( sm.getString("managerBase.createSession.ise"), maxActiveSessions); } in ManagerBase, correct? But I still believe the old behaviour was not completely wrong, either. The old behaviour was wrong because it did not differentiate between minIdleSwap==0 and minIdleSwap==-1 |