[SOLVED] High RAM usage and slow UI

Moderator: crythias

Locked
JeremyB3ntham
Znuny newbie
Posts: 38
Joined: 15 Mar 2015, 10:31
Znuny Version: v4.0.5 (Debian)

[SOLVED] High RAM usage and slow UI

Post by JeremyB3ntham »

We have just migrated to OTRS v4.0.5 on Linux Debian and are noticing very high RAM usage which can be seen attached. We are running OTRS on a VM with 8GB RAM and a 6GB linux-swap. The RAM only started spiking once the Cron jobs were started, and we started fetching emails, but they are the same settings as we had on our Windows server (and very near the default anyway) which never ran out of RAM.

If I reboot the server it is fine, but after a few minutes the RAM just goes, and this is only with one agent logged in and no one else doing any work in the system at all. Our database size is about 2.5GB and we have about 65,000 tickets.

I have some screenshots showing what we see:

Image

Image

Image

The most common processes we see in this one above are the PostMasterMailbox.pl, GenericAgent.pl and PendingJobs.pl. It is never the same process taking the RAM.

Any ideas?
Last edited by JeremyB3ntham on 18 Mar 2015, 13:50, edited 1 time in total.
wurzel
Znuny guru
Posts: 3270
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: High RAM usage and slow UI

Post by wurzel »

Hi,

are you using apache2 worker? Try prefork.

Just an idea...

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
JeremyB3ntham
Znuny newbie
Posts: 38
Joined: 15 Mar 2015, 10:31
Znuny Version: v4.0.5 (Debian)

Re: High RAM usage and slow UI

Post by JeremyB3ntham »

Yes apache2 with mod_perl

Can you tell me more about prefork?
wurzel
Znuny guru
Posts: 3270
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: High RAM usage and slow UI

Post by wurzel »

Hi,

just heard the names and that prefork should be used. Never looked deep into it.

for a start: http://stackoverflow.com/questions/1388 ... worker-mpm

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
JeremyB3ntham
Znuny newbie
Posts: 38
Joined: 15 Mar 2015, 10:31
Znuny Version: v4.0.5 (Debian)

Re: High RAM usage and slow UI

Post by JeremyB3ntham »

Thanks, will take a look at that. However, the main culprit now seems to be the 'PostMasterMailbox.pl' which always has multiple processes running.

I have cleared, recreated and checked the crontab file and there is only one file for any user, that being OTRS and one listing for it that fetches mail every 5 minutes, so not sure why there are always processes for it using loads of memory. We then get a lot of PID errors in the logs because of it.

Mail is fetched fine and there are no errors and I can even stop cron and manually fetch mail, so it works fine, just kills my memory with all these processes.

Image
wurzel
Znuny guru
Posts: 3270
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: High RAM usage and slow UI

Post by wurzel »

Hi,

it should not kill your memory ;)

Sometimes the postmaster.pl is running twice (or better: the process is active)

So maybe you get errors in fetching the mails? Can you have a look at the logfiles? Anything there additional to the PID errors?
Maybe there is a big mail in it?

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
JeremyB3ntham
Znuny newbie
Posts: 38
Joined: 15 Mar 2015, 10:31
Znuny Version: v4.0.5 (Debian)

Re: High RAM usage and slow UI

Post by JeremyB3ntham »

Nope, no errors in fetching emails at all. But there a lot of PID errors, but still mail is always fetched.

It seems every service kills the memory or uses lots of it, whatever is available really.
JeremyB3ntham
Znuny newbie
Posts: 38
Joined: 15 Mar 2015, 10:31
Znuny Version: v4.0.5 (Debian)

Re: High RAM usage and slow UI

Post by JeremyB3ntham »

How can this be:

Code: Select all

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
 3189 mysql     20   0  561m 158m 3456 S  33.3  1.0   4:44.51 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin
 4808 otrs      20   0 2643m 2.5g 5792 S  26.3 15.7   3:47.21 /usr/bin/perl /opt/otrs/bin/otrs.PostMasterMailbox.pl
 4275 otrs      20   0 3731m 3.4g 2088 S  25.9 21.8   5:14.81 /usr/bin/perl /opt/otrs/bin/otrs.PostMasterMailbox.pl
 4929 otrs      20   0  565m 459m 5788 S  25.6  2.9   0:35.44 /usr/bin/perl /opt/otrs/bin/otrs.PostMasterMailbox.pl
I've taken 'postmaster_mailbox' out of my cron folder, recreated the cron file and restarted the entire server, and my cron file now looks like this below. How can there still be processes starting for it?

Code: Select all

# Who gets the cron emails?
MAILTO="root@localhost"

# delete expired cache weekly (Sunday mornings)
20 0 * * 0  /opt/otrs/bin/otrs.DeleteCache.pl --expired >> /dev/null
30 0 * * 0  /opt/otrs/bin/otrs.LoaderCache.pl -o delete >> /dev/null

# generate dashboard stats every hour
5 * * * *    /opt/otrs/bin/otrs.GenerateDashboardStats.pl >> /dev/null

# start generic agent every 10 minutes
*/10 * * * *    /opt/otrs/bin/otrs.GenericAgent.pl -c db >> /dev/null

# check daily the spool directory of OTRS
10 0 * * *  /opt/otrs/bin/otrs.ReprocessMails.pl >> /dev/null

# just every day
01 01 * * * /opt/otrs/bin/otrs.RebuildTicketIndex.pl >> /dev/null

# check scheduler status
*/5 * * * *    /opt/otrs/bin/otrs.Scheduler.pl -w 1 >> /dev/null

# delete every 120 minutes old/idle session ids
55 */2 * * *    /opt/otrs/bin/otrs.DeleteSessionIDs.pl --expired >> /dev/null

# unlock every hour old locked tickets
35 * * * *  /opt/otrs/bin/otrs.UnlockTickets.pl --timeout >> /dev/null
JeremyB3ntham
Znuny newbie
Posts: 38
Joined: 15 Mar 2015, 10:31
Znuny Version: v4.0.5 (Debian)

Re: [SOLVED] High RAM usage and slow UI

Post by JeremyB3ntham »

Solved this.

It was all down to the 'Advanced Escalations Package' from the portal. The latest version we got from there seemed to cause every issue I mentioned in this thread. As soon as I uninstalled it everything was perfect. Strange one, but it could we contain a bug or two.
wurzel
Znuny guru
Posts: 3270
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: [SOLVED] High RAM usage and slow UI

Post by wurzel »

Hi,

the Add On OTRS Advanced Escalations does not produce this errors, you are describing. It is working
fine and fast.

But:
I've taken 'postmaster_mailbox' out of my cron folder, recreated the cron file and restarted the entire server, and my cron file now looks like this below. How can there still be processes starting for it?
there seems to be another installation running. Maybe you did not use original tar.gz package, used a
OS based package from debian. Or both.

Maybe you should set up a clean system. And ask a linux administrator to have a look for the second installation.

Florian
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
JeremyB3ntham
Znuny newbie
Posts: 38
Joined: 15 Mar 2015, 10:31
Znuny Version: v4.0.5 (Debian)

Re: [SOLVED] High RAM usage and slow UI

Post by JeremyB3ntham »

We initially deployed the system via TurnKey with OTRS bundled in, then just upgraded the version of OTRS via the .tar ball.

Everything is working fine now, except we're seeing duplicate tickets get created when it's fetching emails. Not every one, just under half that get fetched get a duplicate in the system.
JeremyB3ntham
Znuny newbie
Posts: 38
Joined: 15 Mar 2015, 10:31
Znuny Version: v4.0.5 (Debian)

Re: [SOLVED] High RAM usage and slow UI

Post by JeremyB3ntham »

Yes, so it looks like there was something else going on as we had other issues too: See viewtopic.php?f=62&t=28569&p=115484#p115484

But all sorted now.
Locked