Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 46294 invoked from network); 23 Apr 2004 18:23:43 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 23 Apr 2004 18:23:43 -0000 Received: (qmail 12785 invoked by uid 500); 23 Apr 2004 18:23:13 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 12762 invoked by uid 500); 23 Apr 2004 18:23:13 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 12651 invoked from network); 23 Apr 2004 18:23:12 -0000 Received: from unknown (HELO gate-f2.rozabg.com) (82.137.92.18) by daedalus.apache.org with SMTP; 23 Apr 2004 18:23:12 -0000 Received: from dishkols (router-k.rozabg.com [82.137.92.62]) by gate-f2.rozabg.com (8.11.6/8.11.6) with SMTP id i3NINEG25372 for ; Fri, 23 Apr 2004 21:23:14 +0300 Message-ID: <001e01c4295f$46d5dfb0$760f010a@dishkols> From: "Dishko Georgiev" To: Date: Fri, 23 Apr 2004 21:17:45 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: [users@httpd] Apache Memory consumption X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, I have strange problem with Apache 2.0.48/PHP4.3.3 on Fedora Core1. I use PHP script that reads very big files and send content to clients. Scripts is: $file=fopen($user_dir."/".$i->fname,"rb"); fseek($file,$f_pos); do { $b=fread($file,1024*4); if (strlen($b) == 0) { break; }; print($b); unset($b); flush(); while(@ob_end_flush()); usleep(50000); } while (true); The flush() function must flush buffers (if any) to client imediatly, but i think its doesnt work. For 2-3 hours all memory of my server is used + all swap memory (3GB) then kernel start killing httpd processes to free memory! I tryed to stop all output buffering in PHP and Apache, stoped all modules that i dont use + all cache modules, all proxy and etc... But problem is same, apache just use all memory! At first i thinked its memory leak in PHP, but after few hours of testing i can tell that problem isnt there. Its look like for some reason apache chields doesnt free memory that it use for buffering before all download finish! Log of apache have just this msg regularly: [Fri Apr 23 19:28:59 2004] [info] (32)Broken pipe: core_output_filter: writing data to the network [Fri Apr 23 19:35:01 2004] [info] (32)Broken pipe: core_output_filter: writing data to the network [Fri Apr 23 19:38:17 2004] [info] (32)Broken pipe: core_output_filter: writing data to the network [Fri Apr 23 19:44:13 2004] [info] (32)Broken pipe: core_output_filter: writing data to the network [Fri Apr 23 19:47:25 2004] [info] (32)Broken pipe: core_output_filter: writing data to the network [Fri Apr 23 19:50:36 2004] [info] (32)Broken pipe: core_output_filter: writing data to the network [Fri Apr 23 19:53:44 2004] [info] (104)Connection reset by peer: core_output_filter: writing data to the network Can some help me whats the problem? Server is running Fedora Core 1, httpd-2.0.48-1.2, PHP 4.3.3-1 all provided from RedHat, system: P4 2.4Ghz, 512MB RAM, 370GB LVM disk --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org