Roundcube Community Forum

 

roundcube causes cpu high load with apache

Started by waster2009, May 20, 2009, 04:01:07 AM

Previous topic - Next topic

waster2009

Hello,

I've recently installed Roundcube 0.2.1 for our users on 1024 RAM with 3Mhz cpu server. But the problem was appear with high CPU load. According to the logs we have about 500 messages sent everyday and about 2500 successfull and non sucessfulls logins. In some periods of the day, for example 00:00 - 10:00 we had a CPU load about 2 and it caused by Apache processes. That is very strange because in that period almost all users are sleep and we have only few logins and sent messages. This is only one virtual host running on the host. I've tried to use Debian Etch and Lenny.

I guess the problem is in Roundcube somewhere?

Thanks.

waster2009

Second day. Average load increased to 4. Very strange.

chrisgu

I've been noticing the same problem, were running on FreeBSD. No real pattern can't figure out whats causing it. Looking at the processes it seems to be stuck in the RUN status, also the lsof output for the affected process  shows both network (client and IMAP) connection are closed so not sure what its doing.

Once I kill the httpd process the load drops back down.

Anyone got any ideas?

waster2009

Well, here are my tries. First of all I've tried to install imapproxy in front of RC. After that CPU load terribly increased to 70! I mentioned that number of concurrent IMAP connections was always the same in that case and was equal to 10. Bingo! I have courier-imap as IMAP server and MAXPERIP setting was 10. That was the point. All other IMAP connections above 10th gave such terrible load. I increased this setting to 100 for the IP-address of RC and deinstalled imapproxy because unfortunately it creates too much concurrent ESTABLISHED connections to the IMAP server and causes "mini DOS attack" as I called it...:)

Now I have CPU load about 0.4. Will observe for that now.

waster2009

#4
Unfortunately, high load is still exist. Don't know why now. It slowly increasing along all day and now is about 3. Besides, there was an hour when a load was incredibly high again and was in 17 - 40 range with 120-170 processes! Can anyone from developers explain what is going on with RoundCube? I guess it is very major problem.

waster2009

Also, can confirm that after apache restarting high load goes down to 0.3-0.4. So as the temporary solution will use "apache restart" instead "apache reload" in logrotate config.

chrisgu

Problem still happening for me if I do a top on the machine I get the following and can see the problems processes.

   last pid: 51489;  load averages:  2.44,  2.24,  2.19   up 33+16:12:40  14:31:44
49 processes:  3 running, 45 sleeping, 1 zombie
CPU: 98.5% user,  0.0% nice,  1.1% system,  0.4% interrupt,  0.0% idle
Mem: 78M Active, 212M Inact, 102M Wired, 11M Cache, 60M Buf, 87M Free
Swap: 666M Total, 15M Used, 651M Free, 2% Inuse

  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
48057 www         1 104    0 30356K 18884K RUN    195:58 39.26% httpd
47983 www         1 104    0 30356K 19136K RUN    195:51 38.09% httpd
51458 www         1  20    0 25236K 15588K lockf    0:01  1.07% httpd
51321 www         1  45    0 27284K 17580K select   0:06  0.78% httpd
51468 www         1  20    0 26260K 16312K lockf    0:01  0.68% httpd
51460 www         1  20    0 25236K 15380K lockf    0:01  0.59% httpd
  607 root        1  44    0  4672K   936K select   4:35  0.00% ntpd
85753 root        1  44    0 23188K 13052K select   1:06  0.00% httpd
  713 root        1  44    0  5876K  1712K select   0:49  0.00% sendmail
  684 mysql       9  20    0 56392K 24308K sigwai   0:20  0.00% mysqld
  723 root        1   8    0  3212K   672K nanslp   0:16  0.00% cron
  515 root        1  44    0  3184K   664K select   0:10  0.00% syslogd
  717 smmsp       1  20    0  5876K  1404K pause    0:02  0.00% sendmail
51459 www         1  20    0 26260K 16544K lockf    0:02  0.00% httpd
51436 www         1  20    0 25236K 15608K lockf    0:02  0.00% httpd
51457 www         1  20    0 25236K 15524K lockf    0:01  0.00% httpd

As soon as I restart apache it drop back to normal. If I run an lsof against these processes I can see that the network connection are all closed, just looks like the httpd proccess isn't closing when the user disconnects.

Is there any way to timeout or close old roundcube connected?

Chris.

waster2009

Dear RC developers. So can you comment this situation? Why it can happen?

rosali

Regards,
Rosali

waster2009

rosali, thank you...will try to post there.

waster2009

It seems that users mailing list is not very popular according to number of messages and answers, at least in May. Posted the problem there anyway.

thiagopramos

HI, I have the same problem.
2 in 4 server have this problem, and I don“t find difference between them.
Restart apache solved problem for 1 or 2 days.
Any idea?

waster2009

Still did not find a reason and corresponding solution for that high load. Don't get any answers from developers in mailing list too. I guess it is a problem if someone besides me encounter such problem. Any ideas?

jay

I have the same problem. Please let me (or better us here in the forum) know when you have some news. thanks j

closer9

I'd also like to see a solution to this issue. I've searched and searched as to why this happens but keep coming up empty.

If anyone finds a solution to this issue, please post it here.