Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B3FCD7622 for ; Tue, 18 Oct 2011 18:15:41 +0000 (UTC) Received: (qmail 6526 invoked by uid 500); 18 Oct 2011 18:15:38 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 6480 invoked by uid 500); 18 Oct 2011 18:15:38 -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 6471 invoked by uid 99); 18 Oct 2011 18:15:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2011 18:15:38 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_FROM,HTML_FONT_FACE_BAD,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mitkany@gmail.com designates 209.85.160.173 as permitted sender) Received: from [209.85.160.173] (HELO mail-gy0-f173.google.com) (209.85.160.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2011 18:15:31 +0000 Received: by gyg10 with SMTP id 10so1128896gyg.18 for ; Tue, 18 Oct 2011 11:15:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=bUVQtW2nABYPJ/3pcrQHkWhNZemEJXZYhFlGHdV4SFY=; b=dSkDQ1OTwvWqlWzSI7bu8LO9VOeCzuMC8mdgFu2wMUqGy/pZux+BsTAAUcD3f5BQJY OG8KoPHkFUnhb1wrkXN5cXfJjI1s2WA2fs3L35CFH1z5gH5u+h8nE8IF39UxRPl698VJ 8GF+Nr4JYW/8KUVT993FyAEXSF+BFhpm2ckKY= MIME-Version: 1.0 Received: by 10.223.62.15 with SMTP id v15mr5503388fah.22.1318961710626; Tue, 18 Oct 2011 11:15:10 -0700 (PDT) Received: by 10.152.41.106 with HTTP; Tue, 18 Oct 2011 11:15:10 -0700 (PDT) Date: Tue, 18 Oct 2011 14:15:10 -0400 Message-ID: Subject: Reuse mod ajp proxy connections From: Dimitar Georgievski To: Tomcat Users List Content-Type: multipart/alternative; boundary=001517402a2a3bf90d04af96b46d --001517402a2a3bf90d04af96b46d Content-Type: text/plain; charset=ISO-8859-1 Hello, We have a Tomcat 5.5.25 server connected to Apache 2.2.9 over mod_ajp_proxy. Monitoring of the servers shows that AJP proxy connections are not reused but closed and reopened. Frequent closing of TCP connections leaves many connections in TIME_WAIT state and this is something we would prefer to avoid if possible. While reviewing of Apache, Tomcat and mod_proxy settings I found that the response from Tomcat contains a flag that indicates if the TCP connection should be reused after the end of a request-handling cycle. http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html#resppacketstruct (See Response packet structure) My understanding of the *reuse* flag in AJP13_END_RESPONSE structure is that this flag is hard coded and cannot be controlled by configuration settings. I couldn't find any in Tomcat AJP connector configuration that could do that. Since Tomcat is sending the response, is there any way to control the reuse of AJP TCP connection through Tomcat configuration? I hope I don't have to resort to editing and recompilation of the mod_ajp_proxy module :-) Thanks, Dimitar --001517402a2a3bf90d04af96b46d--