So, I'm being stuck with a very peculiar spambot: cron
.
Every day, I'm presented with the following e-mail:
/etc/cron.daily/apt: FATAL -> Failed to fork.
What would be causing this error? My /etc/cron.daily/apt
is the same that comes with the default installation, so it's obviously something else.
I'm not concerned about cron sending me mails (as it gives me a lot of useful issues/data). I just want to solve the problem at hand.
Is the system running ouf of memory?
You can have a look in
/var/log/syslog
to see if you get anyOOM
(Out Of Memory) messages during the time of day when/etc/cron.daily/apt
is running./etc/cron.daily/apt
is executed at 06:25, but there is a random sleep in the apt script, so it might be up to 1800 seconds laterThe command
free -m
will also be able to tell you how much free memory you have, andvmstat 5
will be able to show you if you have a lot of swapping, or memory movement going on.If this is the case you might look into adding more swap, adding more memory, or find if you have any unnecessary processes running that takes all of your memory. (A reboot in the case of a memory leak)
Run apt manually?
Have you tried running
/etc/cron.daily/apt
manually to see if you can any more warnings/errors?If you are running Ubuntu 14.04 LTS you'll find a call for
random_sleep
subroutine online 425
. Add a#
on this line to not have it sleep before a run.On Ubuntu 12.04 LTS it is
line 423
. Ubuntu 16.04 LTS should not have this file as far as I can see.Run
/etc/cron.daily/apt
as root like this:Or with
sudo
like this:There might be some interesting errors to point to you the right direction, or try looking in the
/var/log/syslog
file for anything suspicious.