Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

updatedb, can I disable it?

Discussion in 'General Discussion' started by VIPsNET, Aug 13, 2004.

  1. VIPsNET

    VIPsNET Active Member

    Joined:
    Jun 13, 2002
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    151
    hi, can you guys tell me if I can disable the updatedb so it does not run each day at 4AM ? Will it cause any problems to the server when I disable it or I won't be just able to use 'locate' command ?
     
  2. kris1351

    kris1351 Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    963
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Lewisville, Tx
    Why would you want to stop it?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. VIPsNET

    VIPsNET Active Member

    Joined:
    Jun 13, 2002
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    151
    It increases load and sometimes kills my server. Just wake up at 4AM and You will see what I'm talking about, especilly on a busy servers.

    So can I disable it without any problems ?
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    You can disable it if you want (by removing /etc/cron.daily/slocate.cron) but you will effectievly not be able to use locate anymore as it will be completely unreliable and so should remove the database:
    rm /var/lib/slocate/slocate.db

    It is, obviously, very I/O intensive when slocate runs, but it really is an essential tool for server administration and will definitely hamper managing a server having it disabled and unsable. What you could do is move the slocate.cron out of /etc/cron.daily and run it through the root crontab at a more convenient time of the day for you when your server load is at its lightest.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. VIPsNET

    VIPsNET Active Member

    Joined:
    Jun 13, 2002
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    151
    Jonathan, thank You for the reply.
     
  6. clook

    clook Well-Known Member
    PartnerNOC

    Joined:
    Jun 9, 2002
    Messages:
    61
    Likes Received:
    1
    Trophy Points:
    306
    Location:
    Preston, UK
    We've had the slocate cron removed on our servers for a while for this reason. The locate command isn't used a whole lot but if it is needed at any time it's no biggie just to run updatedb beforehand as and when needed.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. kris1351

    kris1351 Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    963
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Lewisville, Tx
    If your system is that overloaded there are more issues than updatedb. One solution is to load SPRI from http://www.rfxnetworks.com. This will allow you to change the priority of applications when they run so they are not at the highest priority like Linux typically runs them.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. patchwork

    patchwork Well-Known Member

    Joined:
    Nov 2, 2001
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    316
    I was getting very high server loads at night 60+, I finally tracked it down to the /etc/cron.daily/slocate.cron script

    Pete
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice