Apache taking up too much CPU

Hi Guys,

I have a test RT 4.0.4 install from the Ubuntu 12.04 repository. This is
not used intensively and at any give time has about 2 users logged in at
max. My setup is as follows

  1. Ubuntu 12.04 with 613MB RAM
  2. RT 4.0.4 from the repository with MySQL5 as the database
  3. Apache2 running with Worker mpm
  4. Currently have 18 users, 15 tickets and 2 queues
  5. No plugins installed/enabled for RT
  6. Nothing else installed on the system. It is solely used for RT.

The problem I am seeing is that every few hours the Apache2 process starts
taking up 99% CPU. A restart fixes it only to have it happen again in some
time. I’ve tried a lot of different ways to debug but can’t figure out what
is happening.

Any tips or suggestions on how to go about figuring out what is causing
this? Anybody else faced the same issues with this particular version from
the repository? Should I go for a manual install of 4.0.7?

Thanks,
BS

Hi bhowmik,

Have you tried increasing your logging level to debug? What’s in your logs? Also check dmesg. What version of perl is installed?

We run 4.0.7 here on ubuntu/lamp at the moment and do not have any problems.On 04/10/2012, at 16:47, “Bhowmik Shah” bhowmik@chironinstruments.net wrote:

Hi Guys,

I have a test RT 4.0.4 install from the Ubuntu 12.04 repository. This is not used intensively and at any give time has about 2 users logged in at max. My setup is as follows

  1. Ubuntu 12.04 with 613MB RAM
  2. RT 4.0.4 from the repository with MySQL5 as the database
  3. Apache2 running with Worker mpm
  4. Currently have 18 users, 15 tickets and 2 queues
  5. No plugins installed/enabled for RT
  6. Nothing else installed on the system. It is solely used for RT.

The problem I am seeing is that every few hours the Apache2 process starts taking up 99% CPU. A restart fixes it only to have it happen again in some time. I’ve tried a lot of different ways to debug but can’t figure out what is happening.

Any tips or suggestions on how to go about figuring out what is causing this? Anybody else faced the same issues with this particular version from the repository? Should I go for a manual install of 4.0.7?

Thanks,
BS


Final RT training for 2012 in Atlanta, GA - October 23 & 24
http://bestpractical.com/training

We’re hiring! Careers — Best Practical Solutions

Regards

Chris O’Kelly
Web Administrator

Minecorp Australia
P: 07 3723 1000
M: 0450 586 190

Minecorp Australia
37 Murdoch Circuit
Acacia Ridge QLD 4110
www.minecorp.com.au

Hi Chris,

Yep, debugging for both RT and Apache is enabled, the logs don’t throw up
anything out of the ordinary. I’ve got Perl 5.14.2 installed.

I’m currently playing with strace and the Apache process to see if i can
spot whats going wrong. I’ve tried stuff from the Performance Tuning page
on the Wiki and though the Mason caching parameters improved performance
but the problem still persists.

BhowmikOn Thu, Oct 4, 2012 at 5:45 PM, Chris O’Kelly Chris.okelly@minecorp.com.auwrote:

Hi bhowmik,

Have you tried increasing your logging level to debug? What’s in your
logs? Also check dmesg. What version of perl is installed?

We run 4.0.7 here on ubuntu/lamp at the moment and do not have any
problems.

On 04/10/2012, at 16:47, “Bhowmik Shah” bhowmik@chironinstruments.net wrote:

Hi Guys,

I have a test RT 4.0.4 install from the Ubuntu 12.04 repository. This is
not used intensively and at any give time has about 2 users logged in at
max. My setup is as follows

  1. Ubuntu 12.04 with 613MB RAM
  2. RT 4.0.4 from the repository with MySQL5 as the database
  3. Apache2 running with Worker mpm
  4. Currently have 18 users, 15 tickets and 2 queues
  5. No plugins installed/enabled for RT
  6. Nothing else installed on the system. It is solely used for RT.

The problem I am seeing is that every few hours the Apache2 process
starts taking up 99% CPU. A restart fixes it only to have it happen again
in some time. I’ve tried a lot of different ways to debug but can’t figure
out what is happening.

Any tips or suggestions on how to go about figuring out what is causing
this? Anybody else faced the same issues with this particular version from
the repository? Should I go for a manual install of 4.0.7?

Thanks,
BS


Final RT training for 2012 in Atlanta, GA - October 23 & 24
http://bestpractical.com/training

We’re hiring! Careers — Best Practical Solutions

Regards

Chris O’Kelly
Web Administrator

Minecorp Australia
P: 07 3723 1000
M: 0450 586 190

Minecorp Australia
37 Murdoch Circuit
Acacia Ridge QLD 4110
www.minecorp.com.au
Sent Via a Mobile Device.

Yep, debugging for both RT and Apache is enabled, the logs don’t throw up anything out of the
ordinary. I’ve got Perl 5.14.2 installed.
I’m currently playing with strace and the Apache process to see if i can spot whats going
wrong. I’ve tried stuff from the Performance Tuning page on the Wiki and though the Mason
caching parameters improved performance but the problem still persists.
> 1) Ubuntu 12.04 with 613MB RAM

That is a tiny amount of RAM, especially if you’re running your
database on the same host. Are you sure you aren’t swapping and
burning CPU doing that?

-kevin

Hi Kevin,

Yep, debugging for both RT and Apache is enabled, the logs don’t throw *
up* anything out of the
ordinary. I’ve got Perl 5.14.2 installed.
I’m currently playing with strace and the Apache process to see if i can
spot whats going
wrong. I’ve tried stuff from the Performance Tuning page on the Wiki and
though the Mason
caching parameters improved performance but the problem still persists.

  1. Ubuntu 12.04 with 613MB RAM

That is a tiny amount of RAM, especially if you’re running your
database on the same host. Are you sure you aren’t swapping and
burning CPU doing that?

Yep, i don’t see any swapping happening, I also don’t expect a large amount
of users (Maximum 5 at any given time) and we only have 19 entries in the
database so far. The database is on the same host.

We are expecting about 1200 tickets at max per year for the current set up.
I would’ve thought that RT would be able to manage that much load with 613
MB or RAM.

How much RAM do you think I would need for a setup like this?

I have just switched over Apache from Worker to Prefork to see if that
makes any difference.

-bhowmik

Try dropping the number of worker threads that apache is running. If it runs out of memory you’ll see things like mail gate failing to send emails. On our system we had to trim this down (sorry I can’t remember the exact apache2.conf settings im on my phone) but the problem for us was that apache would sometimes try to allocate far more memory than the box had (far more than 613mb… But our system is also far busier). Dropping this number helped immediately and has been great ever since.

You will possilbly also need to tune MySQL to use a limited memory footprint.

Given the cost of memory its unusual to see a box with that little ram these days; rt (and indeed just apache / MySQL) will be far happier with more memory.

Let me know if you want me to dig up the exact parameters we changed and I’ll look for them later tonight.

Chris Herrmann
Far Edge
+612 84251400
+614 03393309

There’s no need to CC me, I set a reply-to of the list because I read
the list.On Fri, Oct 26, 2012 at 07:44:17AM +0530, Bhowmik Shah wrote:

On Thu, Oct 04, 2012 at 07:33:44PM +1000, Bhowmik Shah wrote:
Yep, debugging for both RT and Apache is enabled, the logs don’t throw up anything out of
the
ordinary. I’ve got Perl 5.14.2 installed.
I’m currently playing with strace and the Apache process to see if i can spot whats going
wrong. I’ve tried stuff from the Performance Tuning page on the Wiki and though the Mason
caching parameters improved performance but the problem still persists.

  1. Ubuntu 12.04 with 613MB RAM
    That is a tiny amount of RAM, especially if you’re running your
    database on the same host. Are you sure you aren’t swapping and
    burning CPU doing that?

Yep, i don’t see any swapping happening, I also don’t expect a large amount of users (Maximum
5 at any given time) and we only have 19 entries in the database so far. The database is on
the same host.

We are expecting about 1200 tickets at max per year for the current set up. I would’ve thought
that RT would be able to manage that much load with 613 MB or RAM.

How much RAM do you think I would need for a setup like this?

While 613MB could be fine, you have to look at how much RAM is
actually being used, which varies hugely based on your
configuration. In particular, default apache configurations often
spawn lots of high-memory-usage children, and if you pair that with a
64 bit perl, you’re going to burn through 600M of RAM almost
immediately.

Frankly, I wouldn’t try to set up any modern system in less than 1G of
RAM, and would prefer to give it 2G if at all possible.

Unless you can provide some evidence of what’s using your ram or
what’s using your CPU, the standard suggestion that 600M is tiny is
probably the best answer we can give.

-kevin