[imp] 99% cpu (httpd) while opening 400K message in IMP

Alain Fauconnet alain@cscoms.net
Mon, 26 Feb 2001 09:07:09 +0700


On Fri, Feb 23, 2001 at 09:43:46PM -0500, Ryan Zwahr wrote:
> Hi all,
> I have installed IMP on both a Redhat 7.0 server and a Redhat 6.2 server, and 
> this problem only seems to be prevalent on the 6.2 server.  I discovered this 
> while trying to open a mail that was 400K of text.  Just to see what would 
> happen, I forwarded this same mail to my box running redhat 7.0, and did not 
> have the problem.  The problem is, when I click to open the mail, it was timing 
> out initially, saying it was exceeding the maximum time a script could run in 
> horde.lib line 1195 or something like that.  I went into php3.ini and changed 
> that value from 30 to 180 seconds.  This stopped the timeout problem, but it 
> takes about a minute to open up this mail.  I opened up a telnet session to the 
> server and watched as I opened this mail.  What is happening is, as soon as I 
> click to open this mail, an httpd process (Apache) is spawned and uses 99.9% of 
> the processor for the entire 1 1/2 minutes while the mail is being opened.  
> >From the PC's perspective, it just sits with an hourglass like it's waiting. 
> This server is a really powerful box, with 4 processors, running raid and with 
> like 512 MB memory, so I think it's highly unlikely that this is THAT cpu 
> intensive.  Something is wrong.  I forwarded this same message to my server at 
> home running 7.0 with a measly p166mmx and 32 meg of ram, and it opens in 5 
> seconds.  Has anyone seen this?  This is very odd behavior.  I will try and 
> include some screen output on a separate post.  Are there any known bugs out 
> there for such behavior?  I am using the rh6 stuff from ftp.horde.org (the 
> rpms), php3, imp 2.2.4, mysql and ldap.  Let me know if you need specific 
> versions.  Of course I am using php4 on my 7.0 box, so we're not talking the 
> same exact versions on both boxes, but still, I don't think it should be like 
> this.  Imap server is on the same machine too, so everything's local.
>

I've seen this here too. I think IMP is busy word-wrapping the 400  Kb
text using PHP code. Very inefficient. PHP 4 has a  built-in  function
for this so it would be done running native code. IMP detects this and
use this built-in function instead.

Would the low-end box be running PHP 4 instead ?

Regards,
_Alain_