Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49968 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6666 invoked from network); 25 Oct 2010 15:00:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Oct 2010 15:00:33 -0000 Received: from [127.0.0.1] ([127.0.0.1:7589]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id AC/2A-56168-19B95CC4 for ; Mon, 25 Oct 2010 11:00:33 -0400 X-Host-Fingerprint: 88.135.211.190 unknown Received: from [88.135.211.190] ([88.135.211.190:17907] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/78-31821-81475CC4 for ; Mon, 25 Oct 2010 08:12:08 -0400 Message-ID: To: internals@lists.php.net Reply-To: "Yuriy Mykula" Date: Mon, 25 Oct 2010 15:12:04 +0300 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-RFC2646: Format=Flowed; Original X-Posted-By: 88.135.211.190 Subject: Memory problems From: ogogizm@gmail.com ("Yuriy Mykula") Hi everybody, Hope you all are fine. I am trying to create some small SAPI application that should serve specific network requests. Everything went well at the beginning. But I've noticed that application is slowly eating memory while left alone for some time. Moreover, when application is serving around 100 simultaneous requests memory losses are becoming dramatic and application crashes in the end. At the other hand if I limit number of threads on SAPI to, let's say, five, application looks like being capable of working forever. At first I was thinking that is a memory leak inside of my code. I started to remove parts of the code to isolate the problem and at the end in my request handling function I had only four lines of code left: TSRMLS_FETCH(); php_request_startup(TSRMLS_C); php_request_shutdown(TSRMLS_C); return 0; Surprisingly my problem did not go away. I was trying to solve this thing for weeks now. I am rather new to all this php and zend stuff and I suspect I am doing something wrong with php initialization. Can anybody be a nice person and help me out here? Best Regards, Yuriy Mykula