Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 80497 invoked from network); 6 Apr 2011 10:22:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Apr 2011 10:22:15 -0000 Received: (qmail 30993 invoked by uid 500); 6 Apr 2011 10:22:11 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 30947 invoked by uid 500); 6 Apr 2011 10:22:11 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 30938 invoked by uid 99); 6 Apr 2011 10:22:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2011 10:22:11 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dominik.stadler@dynatrace.com designates 216.32.180.16 as permitted sender) Received: from [216.32.180.16] (HELO VA3EHSOBE009.bigfish.com) (216.32.180.16) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2011 10:22:02 +0000 Received: from mail24-va3-R.bigfish.com (10.7.14.240) by VA3EHSOBE009.bigfish.com (10.7.40.29) with Microsoft SMTP Server id 14.1.225.8; Wed, 6 Apr 2011 10:21:40 +0000 Received: from mail24-va3 (localhost.localdomain [127.0.0.1]) by mail24-va3-R.bigfish.com (Postfix) with ESMTP id 65ACB1C0381 for ; Wed, 6 Apr 2011 10:21:40 +0000 (UTC) X-SpamScore: -8 X-BigFish: VPS-8(zz936eK1432Nzz1202hzz8275bh8275dhz32i2a8h668h839h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: KIP:(null);UIP:(null);IPVD:NLI;H:ATEX01.dynatrace.local;RD:cpe90-146-74-58-static.liwest.at;EFVD:NLI Received: from mail24-va3 (localhost.localdomain [127.0.0.1]) by mail24-va3 (MessageSwitch) id 1302085298670411_28800; Wed, 6 Apr 2011 10:21:38 +0000 (UTC) Received: from VA3EHSMHS002.bigfish.com (unknown [10.7.14.236]) by mail24-va3.bigfish.com (Postfix) with ESMTP id 9FAD81770053 for ; Wed, 6 Apr 2011 10:21:38 +0000 (UTC) Received: from ATEX01.dynatrace.local (90.146.74.58) by VA3EHSMHS002.bigfish.com (10.7.99.12) with Microsoft SMTP Server (TLS) id 14.1.225.8; Wed, 6 Apr 2011 10:21:34 +0000 Received: from ATEX01.dynatrace.local ([::1]) by ATEX01.dynatrace.local ([::1]) with mapi id 14.01.0270.001; Wed, 6 Apr 2011 12:21:33 +0200 From: Dominik Stadler To: "users@tomcat.apache.org" Subject: PersistentManager with FileStore reports "persistentManager.swapInInvalid" Thread-Topic: PersistentManager with FileStore reports "persistentManager.swapInInvalid" Thread-Index: Acv0Q0ZupScSdTvSSiKd9eoaBJqEfg== Date: Wed, 6 Apr 2011 10:21:32 +0000 Message-ID: Accept-Language: de-AT, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.10.13] Content-Type: multipart/alternative; boundary="_000_DD8AC4B90AB7194F821649D131F783B3302DC6ATEX01dynatracelo_" MIME-Version: 1.0 X-OriginatorOrg: dynatrace.com X-Virus-Checked: Checked by ClamAV on apache.org --_000_DD8AC4B90AB7194F821649D131F783B3302DC6ATEX01dynatracelo_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, We are using an embedded instance of Tomcat and would like to use a FileSto= re for Session storage to keep memory requirements low while still allowing= to have many sessions opened. This is a single tomcat instance, sharing se= ssions with other instances is not needed. As I embed Tomcat, I have created the FileStore as follows: Context context =3D tomcat.addWebapp(contextRoot, webDir); tomcat.start(); { // Override the default Manager and set a persistent manager whic= h can store Sessions on disk PersistentManager manager =3D new PersistentManager(); FileStore store =3D new FileStore(); store.setDirectory(new File(workDir, "store").getAbsolutePath= ()); manager.setStore(store); context.setManager(manager); manager.setMaxActiveSessions(-1); manager.setMaxIdleSwap(500); manager.setMinIdleSwap(200); manager.setMaxIdleBackup(400); } As far as I understood documentation, this should allow me to have an unlim= ited number of sessions (while the session timeout of 30 minutes still appl= ies), but swaps out the sessions at least after 500 seconds. It basically works fine this way, only a limited number of sessions are hel= d in memory, others are swapped out. The only issue is that I start getting= the following log output frequently after aprox. half an hour when the fir= st sessions are timing out: 2011-04-06 12:17:20 Custome SEVERE [PersistentManagerBase] persistentManag= er.swapInInvalid 2011-04-06 12:17:20 Custome SEVERE [PersistentManagerBase] persistentManag= er.swapInInvalid 2011-04-06 12:17:20 Custome SEVERE [PersistentManagerBase] persistentManag= er.swapInInvalid 2011-04-06 12:17:21 Custome SEVERE [PersistentManagerBase] persistentManag= er.swapInInvalid 2011-04-06 12:17:22 Custome SEVERE [PersistentManagerBase] persistentManag= er.swapInInvalid 2011-04-06 12:17:22 Custome SEVERE [PersistentManagerBase] persistentManag= er.swapInInvalid 2011-04-06 12:17:22 Custome SEVERE [PersistentManagerBase] persistentManag= er.swapInInvalid 2011-04-06 12:17:22 Custome SEVERE [PersistentManagerBase] persistentManag= er.swapInInvalid When looking at the code in PersistentManager and StandardSession, I can no= t explain what this severe-log tries to tell me. It seems we get this for e= very session that is timing out after 30 minutes of inactivity. It seems th= e expiry-check marks the session as "invalid" which in turn causes the chec= k in swapIn() to fail. Now my question: - As it seems to work nevertheless, can I safely ignore this error= message or does it indicate that I am doing something fundamentally wrong = with PersistentManager and FileStore? Thanks... Dominik Dominik Stadler, Team Lead, R&D dynaTrace, domi= nik.stadler@dynatrace.com Skype: sta= dler.dominik dynaTrace >> Monitor. Resolve. Prevent. >> www.d= ynatrace.com | blog.dynatrace.com --_000_DD8AC4B90AB7194F821649D131F783B3302DC6ATEX01dynatracelo_--