Could not send mail cannot allocate memory


We’ve been using RT 5 for some time without issues. Today I noticed that one user had replied to a ticket and the ticket got updated but it didn’t trigger a notification email for us (therefore the ticket was sitting there as we supposed there was no update).

I then replied to the user and RT refused to send out the mail message again. I noticed that in the ticket thread the failures were marked as:

“The RT System itself - Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.”

This is what I found in the logs:

Sep 17 10:08:27 helpdesk RT: [6585] Could not send mail with command /usr/sbin/sendmail -oi -t: open2: fork failed: Cannot allocate memory at /home/rtuser/rt5/sbin/…/lib/RT/Interface/ line 937.

Any ideas?

I think this is exactly what the error message says, the server ran out of memory and couldn’t send the email.

Its good to check how much memory a server has from time to time. Maybe you have a process running thats eating a lot of mem?

Hi knation,

I get that. But maybe I didn’t ask correctly. Since I am having oom issues has anyone got a suggestion to tweak RT 5? We’re currently running on a VM with:

  • Ubuntu 18.04
  • 2 vCPU
  • 3 GB RAM

I mean, this should be enough to run RT5 in theory but still getting the out of memory issues.


That should definitely be enough to run RT, I suspect something else is going on on this machine that’s chewing up RAM. Check top (sort output by memory use) and see which process is being a pig. If you’re running your RT database on the same box & the DB server is holding on to a lot of RAM that could be part of your problem.

Also check that you have “adequate” swap space to deal with RAM demand spikes. As a personal rule I like to have at least 2GB of swap no matter how much RAM I have in a box, but I’ve seen some Ubuntu machines configured with NO swap space, and that’s… uh… “Not Good” IMHO. (With 3GB of RAM you’ll almost certainly hit swap occasionally if just for kicking out unused chunks of the web server code so other stuff can use the RAM. If the DB is on the same box it’s almost guaranteed necessary).