Author Topic: roundcube causes cpu high load with apache  (Read 16395 times)

Offline waster2009

  • Jr. Member
  • **
  • Posts: 12
roundcube causes cpu high load with apache
« on: May 20, 2009, 04:01:07 AM »
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.

Offline waster2009

  • Jr. Member
  • **
  • Posts: 12
roundcube causes cpu high load with apache
« Reply #1 on: May 21, 2009, 09:21:02 AM »
Second day. Average load increased to 4. Very strange.

Offline chrisgu

  • Newbie
  • *
  • Posts: 2
roundcube causes cpu high load with apache
« Reply #2 on: May 22, 2009, 04:41:30 AM »
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?

Offline waster2009

  • Jr. Member
  • **
  • Posts: 12
roundcube causes cpu high load with apache
« Reply #3 on: May 22, 2009, 09:06:32 AM »
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.

Offline waster2009

  • Jr. Member
  • **
  • Posts: 12
roundcube causes cpu high load with apache
« Reply #4 on: May 24, 2009, 03:14:36 PM »
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.
« Last Edit: May 25, 2009, 01:29:11 AM by waster2009 »

Offline waster2009

  • Jr. Member
  • **
  • Posts: 12
roundcube causes cpu high load with apache
« Reply #5 on: May 25, 2009, 01:31:13 AM »
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.

Offline chrisgu

  • Newbie
  • *
  • Posts: 2
roundcube causes cpu high load with apache
« Reply #6 on: May 26, 2009, 09:28:35 AM »
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.

Offline waster2009

  • Jr. Member
  • **
  • Posts: 12
roundcube causes cpu high load with apache
« Reply #7 on: May 27, 2009, 08:07:09 AM »
Dear RC developers. So can you comment this situation? Why it can happen?

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
roundcube causes cpu high load with apache
« Reply #8 on: May 27, 2009, 08:21:17 AM »
Devolopers are extremely seldom here. Please use RoundCube Mailing Lists.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline waster2009

  • Jr. Member
  • **
  • Posts: 12
roundcube causes cpu high load with apache
« Reply #9 on: May 27, 2009, 09:48:34 AM »
rosali, thank you...will try to post there.

Offline waster2009

  • Jr. Member
  • **
  • Posts: 12
roundcube causes cpu high load with apache
« Reply #10 on: May 28, 2009, 02:27:15 AM »
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.

Offline thiagopramos

  • Newbie
  • *
  • Posts: 2
roundcube causes cpu high load with apache
« Reply #11 on: June 10, 2009, 10:13:59 AM »
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?

Offline waster2009

  • Jr. Member
  • **
  • Posts: 12
roundcube causes cpu high load with apache
« Reply #12 on: June 11, 2009, 02:05:27 PM »
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?

Offline jay

  • Jr. Member
  • **
  • Posts: 10
roundcube causes cpu high load with apache
« Reply #13 on: June 12, 2009, 05:16:59 AM »
I have the same problem. Please let me (or better us here in the forum) know when you have some news. thanks j

Offline closer9

  • Newbie
  • *
  • Posts: 1
roundcube causes cpu high load with apache
« Reply #14 on: June 16, 2009, 11:53:33 AM »
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.