Spamd service continuously failing and recovering: Out of memory Print

  • 0

Symptoms

Service checks report a failure to start.

Raw Output: The subprocess reported error number 74 when it ended. (XID bza6em) The service "spamd" failed to send the expected response to host "127.0.0.1" and port "783" because of an error: The service did not pass the built-in GTUBE test. The subprocess "/usr/local/cpanel/scripts/restartsrv_spamd" reported error number 74 when it ended.

Spamd error log /usr/local/cpanel/logs/spamd_error_log reports a failure.

info: spamd: connection from localhost.localdomain [127.0.0.1]:36388 to port 783, fd 5
Out of memory in perl:util:safesysmalloc

 

Cause

SpamAssassin is configured with memory limits to prevent the service from consuming excessive memory on the server. Exceeding the memory limit will cause the service to shut down or fail to start. 

 

Resolution

Increase the memory limit.

Note: Increasing the memory limit too high can cause the server to run out of memory. 

  1. Open the /etc/mail/spamassassin/local.cf file with your preferred text editor
  2. Find the line that loads the ResourceLimits plugin:

    Mail::SpamAssassin::Plugin::ResourceLimits

  3. Add or modify the resource_limit_mem option, and ensure it's below the line that loads the plugin.

    resource_limit_mem 536870912

    Note: The resource_limit_mem limit value is in bytes.

  4. Restart spamd:

    /scripts/restartsrv_spamd


Was this answer helpful?
Back

Send Message