updatedb cron job hangs

General support questions
Post Reply
hokie1999
Posts: 39
Joined: 2011/08/10 15:03:16

updatedb cron job hangs

Post by hokie1999 » 2024/01/09 14:58:14

We here at my company have a number of CentOS 7 servers -- all managed by automation -- that have an issue with updatedb. It runs as a daily cron and hangs, meaning it never finishes when run and produces a file: /var/lib/mlocate/mlocate.db.nAjMzs

Running ps -ef | grep updatedb, we see the process has not finished over many hours.

Killing the updatedb process eliminates the file and the /var partition returns to a normal size but can never create the proper mlocate.db file

See below for troubleshooting history on this issue

This seems to be a fairly widespread problem in stackoverflow in days past. In one post by a user with the problem, he claimed to find the solution but never posted it.

Has anyone had this problem?

Troubleshooting history

--Lots of space on /var partition
--No memory or cpu issues seen on top
--Nothing in /var/log/messages
--Running the /etc/cron.daily file manually works on some of the affected servers
--/etc/updatedb.conf is the same on servers with this issue and ones not affected
--updatedb packages are consistent
--Reboots don't help
--strace for the updatedb cron.daily file doesn't see anything but does hang at what appears to be the finish
--Don't see the affected servers mount to anything like a usb or nfs that could be related
--We have not plans to update the operating system

User avatar
TrevorH
Site Admin
Posts: 33224
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: updatedb cron job hangs

Post by TrevorH » 2024/01/09 17:08:13

Do you have any network based filesystems mounted?
--We have not plans to update the operating system
Then it's time you started making those plans. CentOS 7 goes EOL in just under 6 months time and there will be no more updates, security or otherwise, for it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hokie1999
Posts: 39
Joined: 2011/08/10 15:03:16

Re: updatedb cron job hangs

Post by hokie1999 » 2024/01/09 18:04:39

No, no network efs, nfs, usb connections

Post Reply