From users-return-268703-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Thu Nov 7 14:14:47 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id AD38C180630 for ; Thu, 7 Nov 2019 15:14:46 +0100 (CET) Received: (qmail 93382 invoked by uid 500); 7 Nov 2019 14:14:42 -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 93368 invoked by uid 99); 7 Nov 2019 14:14:42 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Nov 2019 14:14:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3988CC273C for ; Thu, 7 Nov 2019 14:14:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.252 X-Spam-Level: X-Spam-Status: No, score=0.252 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=0.2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 88qL2qD5X8km for ; Thu, 7 Nov 2019 14:14:40 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.210.66; helo=mail-ot1-f66.google.com; envelope-from=tim.k.5967@gmail.com; receiver= Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id E1453BC573 for ; Thu, 7 Nov 2019 14:14:39 +0000 (UTC) Received: by mail-ot1-f66.google.com with SMTP id z6so2136239otb.2 for ; Thu, 07 Nov 2019 06:14:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=SLOcjHz6Tj1ilLIEYv4wkeTe1M5cXA9dCk8d1a+/1bI=; b=iI/7c9t2saAaKJxa8SdN4S5yC+ZEr4rJ0RLQykFlklL7hryIds0Yrn7diOVDjtO5rP eJ4aUM7e+NuxAV5ZqXfQriUStFHDOays9AXvbLdP26SmiD6uDfWkGtZ54UvVAe0qeW4n E9sQnH6zlP/rgJEYIj0cMto2ZQpZHpMPA5h6dphbjhTbPfQBoM9hQ59k6D2ALpNPiBM1 +nj4CmUk6flrJTFuS1daGWC8nAvoQQnN5k8suRrU0nUc5AzOlOH0Wk4Iq2ClKzH0fVEe 7KD/SCBdNmNaHsh3fvL8+jKGyQbMzJKAXJD+qvM8AiXsd02e90lfVR6kFA1KA3Qlmee0 5g9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=SLOcjHz6Tj1ilLIEYv4wkeTe1M5cXA9dCk8d1a+/1bI=; b=c4wmsurJ5bUw6VJxPk5ERmNrew2V2G8sQA0Gyk5KN5XoAD5uZEuvpxesoApk27vpXT 0NDu5tgF/Ipynm2rqrhq81jZfyww6r+BncAkipQ33vgAIh7WetoKF91k2T8BmOe0Zzi+ kAH0+7ex2YWJ7KV0W/DLfb1mWnnDzYU9dyUSbn0XqDShNrrO8pjhJ0LJ1or9RbFELWnp LjXsyboUF+pp9/xDWb2fddrPK38+kr3Cp7ZCh/s/PHWVKjev8eLOMgpmipSfMCq66wYd tCa3GfzOK6UHTf3I3m7OZSFFU3I/bKzaPnlgKuDpWGgRkKS9RiALUKsl1qoOnhnYZL9r P/uQ== X-Gm-Message-State: APjAAAU2I3i+yxh8YJwPeQeWvcqm8CmIc07rUa0abNXOIiLmn+xLeQoH KILwYOan5hJYznTvFHaEQEd1Ypj1Ox83trLTjFNkNg== X-Google-Smtp-Source: APXvYqwtfExmPziiZ3qoSsz2tzNfko/Wo6S5ZFgGbUeVcR+Vz6bS1iZkXwXFFScv/alcfBde5fcoIJ0z48AEULCPKDE= X-Received: by 2002:a05:6830:1211:: with SMTP id r17mr3351117otp.157.1573136079198; Thu, 07 Nov 2019 06:14:39 -0800 (PST) MIME-Version: 1.0 References: <420900e0-5097-0881-edea-c9ba175ea99b@apache.org> <9a7fd033-27fc-6ca2-b3e9-56989accf09d@apache.org> <0d006b48-e212-944c-9cfd-2a28c695f496@apache.org> <3098c3af-3c30-02a5-573f-ead9ea65a47e@apache.org> In-Reply-To: From: Tim K Date: Thu, 7 Nov 2019 09:14:27 -0500 Message-ID: Subject: Re: Intermittent JSP Caching/Compiling Issue while under load To: Tomcat Users List Content-Type: multipart/alternative; boundary="0000000000002f1e4c0596c24970" --0000000000002f1e4c0596c24970 Content-Type: text/plain; charset="UTF-8" On Thu, Nov 7, 2019, 6:40 AM Mark Thomas wrote: > On 06/11/2019 20:04, Mark Thomas wrote: > > I've found the root cause. > > > > When checking the timestamps of JSPs, the JSP engine (because it has to > > access all resources via the Servlet API) requests a URL for the JSP, > > opens a connection to the URL and then checks the last modified time. > > This goes directly to the on-disk file. > > > > When reading the content, the request goes via the static resource cache > > because we can intercept the call to ServletContext.getResourceAsStream() > > > > The problem is the following sequence: > > - request for JSP > > - no change in JSP timestamp found > > - cache re-validated (for 5s by default) > > - JSP is modified (within 5s) > > - request for JSP (within 5s) > > - change in JSP timestamp found > > - JSP content read (sees cached version rather than new version) > > > > So we end up with the old version of the JSP content with the updated > > last modification time. > > > > I'm currently looking at options to return a URL for the resource where > > we can intercept the call to URLConnection.getLastModified(). > > Fixed in: > - master for 9.0.28 onwards > - 8.5.x for 8.5.48 onwards > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org I pulled the latest code from GitHub, I see the commit related to this email thread in the log, I built from master with ant (9.0.28-dev) and I'm still experiencing the issue... I have a curl command executing every second (via watch -n1) going to a JSP while making an edit to it. I can reproduce the cached issue every 2-3 edits. --0000000000002f1e4c0596c24970--