From owner-freebsd-apache@FreeBSD.ORG Fri Jan 6 10:03:47 2006 Return-Path: X-Original-To: apache@freebsd.org Delivered-To: freebsd-apache@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51B0C16A41F for ; Fri, 6 Jan 2006 10:03:47 +0000 (GMT) (envelope-from len@ilance.nl) Received: from smtp02.unet.nl (smtp02.unet.nl [82.148.223.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id D24F143D46 for ; Fri, 6 Jan 2006 10:03:46 +0000 (GMT) (envelope-from len@ilance.nl) Received: from laptoplen (82-148-208-20.fiber.unet.nl [82.148.208.20]) by smtp02.unet.nl (Postfix) with SMTP id E6F3516CDCB; Fri, 6 Jan 2006 11:03:43 +0100 (CET) Message-ID: <005601c612a8$7ab89280$4801a8c0@dwslan.datawire.nl> From: "ilance" To: , Date: Fri, 6 Jan 2006 11:03:44 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Cc: Subject: mod_perl leaks memory on FreeBSD X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2006 10:03:47 -0000 Apache / mod_perl leaks memory every time it receives a SIGHUP (apachectl restart). This is the case on all of our FreeBSD boxes (5.3, 5.4 and 6.0). I've tried to reproduce it on other platforms. It does not happen on Linux or Mac OS. No need to do anything special to reproduce this on FreeBSD though. Just install the mod_perl2 (or mod_perl for apache 1.3) package and issue some "apachectl restart" commands. You'll see the apache parent process grow with about 20 - 50 % -------------------------------------------------------------------- apachectl start # ps aux|grep httpd | grep root root 70820 59.0 5.6 46408 43552 ?? Ss 4:03PM 0:04.40 /usr/local/sbin/httpd -k start So: 43MB right after starting (that's quite large because I'm preloading a lot of stuff). Now send it a SIGHUP: # kill -HUP 70820 # ps aux| grep httpd | grep root root 70820 17.4 7.7 62440 59564 ?? Rs 4:03PM 0:08.48 /usr/local/sbin/httpd -k start Wow: the HTTP root process has grown from 43 to 59MB just because I sent it a SIGHUP. On my test box it takes about 50 "apachectl restart" commands, but then apache crashes with a "Out of memory during request" error. I was using a log rotation script which send a SIGHUP to apache every night. That made my apache/mod_perl boxes crash every few weeks. Len Kranendonk