Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EC23672B5 for ; Thu, 20 Oct 2011 08:33:41 +0000 (UTC) Received: (qmail 51696 invoked by uid 500); 20 Oct 2011 08:33:39 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 51466 invoked by uid 500); 20 Oct 2011 08:33:38 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 51456 invoked by uid 99); 20 Oct 2011 08:33:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2011 08:33:36 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of v.damore@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; Thu, 20 Oct 2011 08:33:31 +0000 Received: by gyg10 with SMTP id 10so3230908gyg.18 for ; Thu, 20 Oct 2011 01:33:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=+6+ueg/MZ+J0fJCV2sjHGIfVQ0kKBWGjCUlyJjohq8U=; b=vtBTQnnrTc0TJf8Po/bYjh50c3loIb8IT/ubo5Mn9cjH0d5r4ytGyBN2mRCMYqJRuq XRVfl07tiqGntfQ8O0I0NkcekR5KYZQjSxPyHqq8uVKLCqRLwTIeQpSlCorqFhiclXBr iysyzj80xKcfkdLh5o5G4oLFNJjbn2Im0SdpU= Received: by 10.182.235.72 with SMTP id uk8mr1758375obc.75.1319099590141; Thu, 20 Oct 2011 01:33:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.231.70 with HTTP; Thu, 20 Oct 2011 01:32:50 -0700 (PDT) In-Reply-To: References: From: "Vincenzo D'Amore" Date: Thu, 20 Oct 2011 10:32:50 +0200 Message-ID: Subject: Re: PHP script is running very slowly when using Apache PHP module To: modules-dev@httpd.apache.org Cc: fionasisk@yahoo.ie Content-Type: multipart/alternative; boundary=14dae93b63567e653104afb6cece --14dae93b63567e653104afb6cece Content-Type: text/plain; charset=UTF-8 Hello Fiona, have you tried to strace apache process ? Take a look at this: http://httpd.apache.org/dev/debugging.html On Mon, Oct 17, 2011 at 6:49 PM, Fiona Sisk wrote: > Hi, > > I have a problem with the Apache PHP module and am hoping for some pointers > on how to investigate it. > > I have written a PHP extension that is called by a PHP script. > I use PHP as a module of Apache ( 1.3.37 or 2.2.19, I've tried both). > * > LoadModule php5_module libexec/apache/libphp5.so* > > I'm getting very slow response times from my PHP script. (approx 1 minute) > > However it is only when I run it as an Apache module that the problem > manifests itself. > If I run the PHP script /PHP extension on the command-line i.e. not as a > module of Apache the time it takes is negligible. > > > The PHP (5.3.4) extension crunches a lot of data from a DB and eventually > produces one very large PHP array. > which is returned to the client as JSON in the HTTP $_POST response ( Also > gzip compression of the HTTP contents is used.) > (In JSON format, the size of the array is 3.7M) > > I didn't have any problems with the application until recently when the > size > of the data I'm requesting has increased dramatically. > > So it seems that I need to do some 'module' tuning of Apache but I don't > know how. I have already changed these parameters in > the php.ini to make the extension work. I include some relevant looking > httpd.conf parameters also below. I haven't touched any of these. > > max_execution_time = 60 ( 'cos the PHP script execution was timing out > before the extension finished!) > memory_limit = 256M > > > Any suggestions.? Please bear in mind that I'm not trying to write a Apache > module, just figure out what my performance > problems are when using a very common one. > > Thanks in advance. > Fiona > > ScoreBoardFile /var/run/httpd.scoreboard ( doesn't exist on my Linux > machine) > Timeout 300 > KeepAlive On > MaxKeepAliveRequests 100 > KeepAliveTimeout 15 > MinSpareServers 5 > MaxSpareServers 10 > StartServers 5 > MaxClients 150 > MaxRequestsPerChild 0 > LoadModule vhost_alias_module libexec/apache/mod_vhost_alias.so > LoadModule env_module libexec/apache/mod_env.so > LoadModule define_module libexec/apache/mod_define.so > LoadModule config_log_module libexec/apache/mod_log_config.so > LoadModule mime_magic_module libexec/apache/mod_mime_magic.so > LoadModule mime_module libexec/apache/mod_mime.so > LoadModule negotiation_module libexec/apache/mod_negotiation.so > LoadModule status_module libexec/apache/mod_status.so > LoadModule info_module libexec/apache/mod_info.so > LoadModule includes_module libexec/apache/mod_include.so > LoadModule autoindex_module libexec/apache/mod_autoindex.so > LoadModule dir_module libexec/apache/mod_dir.so > LoadModule cgi_module libexec/apache/mod_cgi.so > LoadModule asis_module libexec/apache/mod_asis.so > LoadModule imap_module libexec/apache/mod_imap.so > LoadModule action_module libexec/apache/mod_actions.so > LoadModule speling_module libexec/apache/mod_speling.so > LoadModule userdir_module libexec/apache/mod_userdir.so > LoadModule alias_module libexec/apache/mod_alias.so > LoadModule rewrite_module libexec/apache/mod_rewrite.so > LoadModule access_module libexec/apache/mod_access.so > LoadModule auth_module libexec/apache/mod_auth.so > LoadModule anon_auth_module libexec/apache/mod_auth_anon.so > LoadModule dbm_auth_module libexec/apache/mod_auth_dbm.so > LoadModule digest_module libexec/apache/mod_digest.so > LoadModule proxy_module libexec/apache/libproxy.so > LoadModule cern_meta_module libexec/apache/mod_cern_meta.so > LoadModule expires_module libexec/apache/mod_expires.so > LoadModule headers_module libexec/apache/mod_headers.so > LoadModule usertrack_module libexec/apache/mod_usertrack.so > LoadModule log_forensic_module libexec/apache/mod_log_forensic.so > LoadModule unique_id_module libexec/apache/mod_unique_id.so > LoadModule setenvif_module libexec/apache/mod_setenvif.so > LoadModule php5_module libexec/apache/libphp5.so > > GOS Networks Limited, National Software Centre, Mahon, Cork, Ireland. > > Registered company number: 445828 > > > The information in this email is confidential and may be legally > privileged. > It is intended solely for the addressee. Access to this email by anyone > else > is unauthorised. If you are not the intended recipient, any disclosure, > copying, distribution or any action taken or omitted to be taken in > reliance > on it, is prohibited and may be unlawful. When addressed to our clients any > opinions or advice contained in this email are subject to the terms and > conditions expressed in the governing GOS Networks agreement. > > -- Vincenzo D'Amore email: v.damore@gmail.com msn: freedev@hotmail.com skype: free.dev mobile: +39 349 8513251 --14dae93b63567e653104afb6cece--