RT 4.0.2 exim Cannot allocate memory

Hi,

We successfully reconfigured our RT server to use Gmail instead of a
local smtp server.

Unfortunately we are running into ‘Cannot allocate memory’ errors
after apache consumes all the available memory, please see sample
error below:

[Mon Jul 23 09:34:04 2012]
[crit]:rt-4.0.2-1424-1343036044-450.5978-6-0@ourdomain: Could not
send mail with command /usr/sbin/sendmail -oi -t: couldn’t execute
program: Cannot allocate memory at
/usr/share/request-tracker4/lib/RT/Interface/Email.pm line 448.

The top command, with the shift M option, shows Apache as being the culprit.

Our server is running the below software:

RT 4.0.2
Exim version 4.72
Debian version 6.0.3
Apache/2.2.16 (Debian)

The /etc/request-tracker4/RT_SiteConfig.pm perl module previously had
the below email configuration lines:

Set($MailCommand , ‘smtp’);
Set($SMTPServer, ‘local_email_server’);

These have now been changed to:

Set( $MailCommand, ‘sendmailpipe’);
Set( $SendmailPath , “/usr/sbin/sendmail”);
Set( $SendmailArguments , “-oi -t”);

Sendmail is a symlink to exim4.

The below thread, sheds more light on the problem, sendmailpipe being
incompatible with exim:

http://comments.gmane.org/gmane.comp.bug-tracking.request-tracker.user/47169

To fix the problem could we use the below configuration in the
/etc/request-tracker4/RT_SiteConfig.pm file?

Set($MailCommand , ‘sendmail’);
Set($SendmailArguments , “-bm – ”);
Set($SendmailPath, “/usr/sbin/exim4”);
Set($NotifyActor, 1);

Sourced from: http://requesttracker.wikia.com/wiki/ManualInstallation

Or should we use the Apache prefork MPM change in:

http://comments.gmane.org/gmane.comp.bug-tracking.request-tracker.user/47169

Any other suggestions, will be greatly appreciated.

Thanks

John

Hi,

Your system is out of memory. You should lower number of apache
processes. Setup more more memory effective configuration. Lower
number of requests each child serves before restart. I know that
lowering number of translations loaded into RT can lower memory
footprint.

Do you use mod_perl? Do you use FCGI?

We don’t know anything about your setup to help you fit RT into memory.

Using sendmailpipe method is correct thing to do and recommended. You
have less problems than with smtp, but it sure fails if your server is
not able to run a new process.On Wed, Jul 25, 2012 at 5:33 PM, John Mclean john.mclean@axomic.com wrote:

Hi,

We successfully reconfigured our RT server to use Gmail instead of a
local smtp server.

Unfortunately we are running into ‘Cannot allocate memory’ errors
after apache consumes all the available memory, please see sample
error below:

[Mon Jul 23 09:34:04 2012]
[crit]:rt-4.0.2-1424-1343036044-450.5978-6-0@ourdomain: Could not
send mail with command /usr/sbin/sendmail -oi -t: couldn’t execute
program: Cannot allocate memory at
/usr/share/request-tracker4/lib/RT/Interface/Email.pm line 448.

The top command, with the shift M option, shows Apache as being the culprit.

Our server is running the below software:

RT 4.0.2
Exim version 4.72
Debian version 6.0.3
Apache/2.2.16 (Debian)

The /etc/request-tracker4/RT_SiteConfig.pm perl module previously had
the below email configuration lines:

Set($MailCommand , ‘smtp’);
Set($SMTPServer, ‘local_email_server’);

These have now been changed to:

Set( $MailCommand, ‘sendmailpipe’);
Set( $SendmailPath , “/usr/sbin/sendmail”);
Set( $SendmailArguments , “-oi -t”);

Sendmail is a symlink to exim4.

The below thread, sheds more light on the problem, sendmailpipe being
incompatible with exim:

http://comments.gmane.org/gmane.comp.bug-tracking.request-tracker.user/47169

To fix the problem could we use the below configuration in the
/etc/request-tracker4/RT_SiteConfig.pm file?

Set($MailCommand , ‘sendmail’);
Set($SendmailArguments , “-bm – ”);
Set($SendmailPath, “/usr/sbin/exim4”);
Set($NotifyActor, 1);

Sourced from: http://requesttracker.wikia.com/wiki/ManualInstallation

Or should we use the Apache prefork MPM change in:

http://comments.gmane.org/gmane.comp.bug-tracking.request-tracker.user/47169

Any other suggestions, will be greatly appreciated.

Thanks

John

Best regards, Ruslan.

Thanks for your input Ruz,

I don’t feel it’s an Apache configuration issue as the server was
running fine on a 1/4 of the memory before the switch-over.

The memory usage is climbing steadily, looks more like a memory leak.On 25 July 2012 15:02, Ruslan Zakirov ruz@bestpractical.com wrote:

Hi,

Your system is out of memory. You should lower number of apache
processes. Setup more more memory effective configuration. Lower
number of requests each child serves before restart. I know that
lowering number of translations loaded into RT can lower memory
footprint.

Do you use mod_perl? Do you use FCGI?

We don’t know anything about your setup to help you fit RT into memory.

Using sendmailpipe method is correct thing to do and recommended. You
have less problems than with smtp, but it sure fails if your server is
not able to run a new process.

On Wed, Jul 25, 2012 at 5:33 PM, John Mclean john.mclean@axomic.com wrote:

Hi,

We successfully reconfigured our RT server to use Gmail instead of a
local smtp server.

Unfortunately we are running into ‘Cannot allocate memory’ errors
after apache consumes all the available memory, please see sample
error below:

[Mon Jul 23 09:34:04 2012]
[crit]:rt-4.0.2-1424-1343036044-450.5978-6-0@ourdomain: Could not
send mail with command /usr/sbin/sendmail -oi -t: couldn’t execute
program: Cannot allocate memory at
/usr/share/request-tracker4/lib/RT/Interface/Email.pm line 448.

The top command, with the shift M option, shows Apache as being the culprit.

Our server is running the below software:

RT 4.0.2
Exim version 4.72
Debian version 6.0.3
Apache/2.2.16 (Debian)

The /etc/request-tracker4/RT_SiteConfig.pm perl module previously had
the below email configuration lines:

Set($MailCommand , ‘smtp’);
Set($SMTPServer, ‘local_email_server’);

These have now been changed to:

Set( $MailCommand, ‘sendmailpipe’);
Set( $SendmailPath , “/usr/sbin/sendmail”);
Set( $SendmailArguments , “-oi -t”);

Sendmail is a symlink to exim4.

The below thread, sheds more light on the problem, sendmailpipe being
incompatible with exim:

http://comments.gmane.org/gmane.comp.bug-tracking.request-tracker.user/47169

To fix the problem could we use the below configuration in the
/etc/request-tracker4/RT_SiteConfig.pm file?

Set($MailCommand , ‘sendmail’);
Set($SendmailArguments , “-bm – ”);
Set($SendmailPath, “/usr/sbin/exim4”);
Set($NotifyActor, 1);

Sourced from: http://requesttracker.wikia.com/wiki/ManualInstallation

Or should we use the Apache prefork MPM change in:

http://comments.gmane.org/gmane.comp.bug-tracking.request-tracker.user/47169

Any other suggestions, will be greatly appreciated.

Thanks

John


Best regards, Ruslan.