Score:0

EC2 server with a crond-service and full /var/spool/exim/-folder

ug flag

I'm no expert in linux, apache, etc. but I have this service running on an AWS EC2-server. There is a large number of cron-jobs running on my platform (about 50K / day).

Last week upgraded the EC2-instance and then I started the cron-service on the new instance. Since then, the cron-jobs are leaving a massive amount of output-files in the /var/spool/exim/input-folder. They are all named something like "1mUsgr-0001Ia-DK-H" or "1mUshi-0001PS-Jq-D" and contains the output for a specific cron job. This lead to more than 100GB of these files in a few days and for obvious reasons I don't want that.

So how do I disable this "log" feature for the crond or how do I debug what's causing this?

I don't know what exim is but I ran the command service exim stop earlier without any luck...

Michael Hampton avatar
cz flag
What Linux distribution is this?
Simon Degn avatar
ug flag
@MichaelHampton NAME="Amazon Linux AMI" VERSION="2018.03" ID="amzn" ID_LIKE="rhel fedora" VERSION_ID="2018.03" PRETTY_NAME="Amazon Linux AMI 2018.03" ANSI_COLOR="0;33" CPE_NAME="cpe:/o:amazon:linux:2018.03:ga" HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
Score:1
ug flag

I found the solution after hours of research.

The issue is quite simple. Crontabs are designed to place the output of the cronjob somewhere. Since this destination was not specified in my setup the destination for the output was placed in the /var/spool/exim/input-folder with one individual file per output which quickly lead to a huge amount of files and memory issues.

My solution was to specify another "destination" for the output. By adding

MAILTO=""

to the top of my crontabs, I specify the output to be sent to the email-address "". Now, the /var/spool/exim/input-folder is clean and the cronjobs are still running perfectly fine.

If you are reading this, chances are that you could use this solution as well :-)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.