RE: IMAP extension causing delays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Edward Kay [mailto:edward@xxxxxxxxxx]
> Sent: 19 October 2006 14:53
> To: php-general@xxxxxxxxxxxxx
> Subject:  IMAP extension causing delays
>
> Hello,
>
> I need PHP's IMAP extension for my web app but it is really slowing my
> server up.
>
> My setup: Fedora Core 5, Apache 2.2.2, PHP 5.1.4 (run as CGI with suPHP),
> PHP IMAP extension - all standard FC5 RPMs. The test page is
> simple - just a
> call to phpinfo().
>
> Without the IMAP extension, the response time is almost
> immediate. With the
> IMAP extension it takes 2-3 seconds to respond - sometimes as much as 4
> secs.
>
> Watching with 'top', I can see php-cgi is called immediately when the
> request is received. With the IMAP extension installed, after php-cgi
> starts, it then drops to the end of the 'top' list, consuming 0% CPU and
> 2.0% memory. It remains there for the 2-3 second delay before coming into
> play again an running the script quickly. Without the IMAP extension, it
> just ends quickly having finished the request.
>
> From this, it is clear to me there is some major delay being
> introduced by
> the loading of the IMAP extension. Any ideas on how to resolve this?
>
> Thanks,
> Edward
>

Thanks to all the suggestions I received on this issue.

I have tried running PHP as an Apache module. As Jochem mentioned, this
restricts the startup delay to just when Apache starts, not with each
request - which is a great improvement.

I have also set the various configuration options in the VirtualHost
directives so my requirement for separate php.ini files has been removed.

There is one remaining issue though - how to get my PHP scripts to run under
different usernames for each virtual host. I need my PHP scripts to run as
specfic users as they need to interact with the filesystem. I am using
suExec and have set the SuexecUserGroup directive for each virtual host, but
this isn't used as PHP is not called by CGI.

Any suggestions?

Thanks,
Edward

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux