The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/scripts/upcp and memory usage on FreeBSD

Discussion in 'General Discussion' started by hicom, Dec 29, 2003.

  1. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    I've been working on this problem for a month now and finally found out that the cron job /scripts/upcp that runs every night is using up the Wired Memory resources on constant basis until the server crash.

    It is very strange, like today the Wired Mem was 158MB , once the script ran the Wired Mem jumped to 189MB. After the script finished, the Wired Mem kept rising steadily and now it is @ 209MB and still going up for no reason. I've disabled all other cron jobs.

    Running FreeBSD 4.9 with cPanel 8.5.3-S6 . I've cPanel set to Manual update & automatic update on Packages , Security , Ports.

    I've the log of the /scripts/upcp process and there seems to be couple of errors.

    However, this problem has been always happening with using up the Wired Memory until the server crash. If I disable the /scripts/upcp everything works fine.

    Anyone suggestions or similar encounters ?
     
  2. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    16
    Yes similar, except im not crashing. The wired memory is not swapping to inactive and have to reboot every couple weeks. Im going to the NOC next Monday to drop another 512 MEGS of RAM into the machines to see if this will help. Even though I doubt it.

    I have all the cpanel updates to manual, except for security.

    What errors did you see in the logs?

    Thanks
     
  3. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    I have 1GB ram on the server with very light usage (less than 10GB b/w and 0.0 averages), but as you said the Wired Mem just keep being used and it doesn't free to inactive. If I don't restart the server every couple of days, the server will crash.

    I know 100% this is being caused by /scripts/upcp no matter what option I choose in regard to manual update, security only. I'm going to to run the cron job again tonight but with no update options selected at all.

    As far as errors, I've noticed these:

    Cpanel updates are coming from layer2.cpanel.net
    pw: no such user `xfs'
    pw: user 'daemon' is already locked

    >> Attempting to fetch from ftp://ftp.phear.org/pub/linux/networking/ftp/client/lftp/.
    wrote 80 bytes read 301 bytes 254.00 bytes/sec
    total size is 10089 speedup is 26.48
    Killed
    chkservdreceiving file list ... done


    I've rebooted the server last night before the upcp cron job ran and so far the Wired mem usage reached 189MB. Last week, when rebooted the machine with upcp off it was only at 126MB after 3 days.

    I ony have security, DarkORB updates on.
     
  4. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    16
    What about your backup config?

    My wired memory shoots up after they run and does not come back down, plus they swap heavy. I have choosen to do backups manualy on my large client based machines. Next Monday we will be placing one machine into a RAID Controller system and will see how that does.

    If that does not lower the wired memory, the only thing I can think of, there must be some leaking somewhere.

    This applys to all our machines, and we are running FREEBSD 4.8
     
  5. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    The memory usage does go up when running the cpbackup script, but as far as Wire Mem, it goes down to the same level before cpbackup was ran.

    However, this only occurs when upcp is disabled. If upcp is enabled, as you said, the backup will increase the wired mem by at least 20-40MB on the server

    I agree something is leaking, but I couldn't find it. I tracked all cpanel, root owned processes with no luck.

    I also compared vmstat data before/after but I only noticed FFS Node increases significantly.

    I also tweaked kernel using the VM options and limited maxusers to 512 as was recommended on BSD 4.3, which seemed to help lower the Wired Mem usage, but it didn't stop it from increasing steadily after upcp is enabled
     
  6. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    I see I'm not alone with this problem.

    I'm a newbie at this and figured it was the upcp cron only because of the time it ran and the time I'd start having problems.

    Excuse my ignorance as my total experience with Nix and a dedicated server is less than a month, but, to disable the cron tab for the UPCP script I just put a "#" in front of the line of the
    /var/cron/tabs/root
    file.

    That's the correct file, isn't it?

    I'm still trying to figure out where everything is at and whether it's a backup or not.

    I also saw posted in the forum about changing in the exim.conf file
    smtp_enforce_sync = false
    to help reject spam.

    In order to do this, I found out you need to make a change in the
    /etc/chkserv.d/exim
    file changing the 220 to 554.

    However, every night when UPCP would run it would replace the file to one dated 12/20/2000 in effect changing it back to the 220 and thus causing exim to show a failure.

    At first I thought there was a backup file it was replacing it with and I found one in
    /usr/local/cpanel/bsdconf/chkservd/chkservd/chkserv.d
    but changing that one didn't help either and that one was getting replaced with the same file/date.

    Thanks
    Chris
     
  7. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    Yes, you're right about the cron path. After you comment the UPCP line, you need to reinstall the cron by doing:
    # crontab root

    UPCP is very annoying when it comes to replacing modified files. Best way to prevent that is to 'chflags schg' the files you don't want replaced. However, this may cause you big problems down the road if for example EXIM is updated.

    Are you also experiencing the problem with the Wired Memory increasing when UPCP run ?
     
    #7 hicom, Dec 30, 2003
    Last edited: Dec 31, 2003
  8. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    Yeah, big time. After running my wired memory goes up and sendmail hangs, memory usage keeps creeping up until apache and whatnot fails. I'm still able to reboot which solves the problem, until upcp runs again.

    Chris
     
    #8 ckh, Dec 30, 2003
    Last edited: Dec 30, 2003
  9. bmcgrail

    bmcgrail Well-Known Member

    Joined:
    Dec 8, 2003
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    FreeBSD 4.9 Memory Leak

    I am also having this problem, but I have not had time to try and troubleshoot it.

    Has anyone opened a trouble ticket with Cpanel?

    I am running FreeBSD 4.9
    Cpanel 8.5.3-RELEASE_4
     
  10. Dillard

    Dillard Well-Known Member

    Joined:
    Feb 26, 2003
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    The Netherlands
    Hmm, same here. FreeBSD 4.9 and Cpanel 8.5.3-S6.

    At first I thought I went crazy because my box is crashing every 3-5 days. It's rebooting itself (luckily) so the discomfort is not to big. After looking arond and finding this thread I can only confirm that Wired Mem is high (383 on a busy machine, even 532 on low usage machine).

    But this is really anoying. I hope Nick can look into this short-term. Anybody already opened a ticket for this ??

    Dillard
     
  11. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    I don't think there is a ticket already opened. So feel free to open a ticket and post it here.

    I can provide my data as well if you need it.
     
  12. Dillard

    Dillard Well-Known Member

    Joined:
    Feb 26, 2003
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    The Netherlands
    Bugticket opened...

    cPanel.net Support Ticket Number: 34225
     
  13. Dillard

    Dillard Well-Known Member

    Joined:
    Feb 26, 2003
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    The Netherlands
    Got a response:

    "This is a known issue and is being investigated"

    cPanel.net Support Ticket Number: 34225
     
  14. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    Excellent.......Thanks for keeping us posted. I hope they'll find a solution soon, it must be one of the /scripts that runs with /script/upcp.

    In the mean time, I disabled UPCP and DCPUMON cron jobs until this matter is resolved.
     
  15. Dillard

    Dillard Well-Known Member

    Joined:
    Feb 26, 2003
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    The Netherlands
    Hmm, i see now that we had perl.core dumps on all our FreeBSD (4.9 and 5.1) servers in the past two to three days. They are aroung 100MB and located in /root. Anybody else?

    I think this has something to do also with the updates / perhaps /scripts/upcp
     
  16. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    I've noticed the same file dating back to January 1st. I deleted it by mistake and seems not to cause harm so far :)
     
  17. eperdeme

    eperdeme Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Manchester, UK
    cPanel Access Level:
    DataCenter Provider
    coring

    Hmm interesting thread, my box has 4gig of ram 1hour after reboot, 165M Wired. The box seems to reboot every 30days give or take a day, is this the result of this cpanel bug? The wired memory goes to like 480 shortly before rebooting itself but there's still plenty of RAM left....Idea's...nothing is written to any log to suggest why the box randomly reboots it's starting to get annoying now.
     
  18. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    This is the same thing everyone is having with FreeBSD and cPanel. There is more memory left, but for some reason the server just crash or reboots when the kernel memory becomes relatively large (350MB+)

    I guess we'll have to wait for cPanel to diagnose the problem and update us on it.
     
  19. Dillard

    Dillard Well-Known Member

    Joined:
    Feb 26, 2003
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    The Netherlands
    UPDATE:

    Datum: Tue, 06 Jan 2004 17:20:11 -0500
    Onderwerp: [cPanel tickets ID# 34225] Re: [BUG REPORT] Memory leak
    Hello,

    I'm sending this up to the developers right away, I can't promise an ETA for a fix since I don't know what the problem is, but hopefully it won't take them very long to find it.

    Thanks,
    Darren

    ==================
    Just to keep you guys posted as well

    cPanel.net Support Ticket Number: 34225
     
  20. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Try running

    touch /var/cpanel/usebsdpkgs


    this _may_ fix the problem.
     
Loading...

Share This Page