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.

60000+ users on a single server

Discussion in 'cPanel Developers' started by sbonner, Jul 1, 2012.

  1. sbonner

    sbonner Member

    Joined:
    Jul 1, 2012
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    How to make this mastadon called Cpanel allow me to set up more than 60k users on a single server?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Do you mean via a script to automatically create that many users or what precisely? cPanel itself does not have a user limitation, but memory limitations in reading /etc/passwd will come into effect on the system itself. The most users I've ever seen were 16,000 and that system was stuggling for memory to add users at that point to /etc/passwd, /etc/group and /etc/shadow for reading it to add a user.
     
  3. sbonner

    sbonner Member

    Joined:
    Jul 1, 2012
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    I originally asked if cpanel can handle more than 60k users.

    I use a billing software, which adds accounts via API calls. When it comes to 60k users cpanel fails with this error:
    Could not allocate a group id. Please remove /var/cpanel/usedids.* if you are sure it is safe to reallocate gids.

    The system is linux operated under 2.6 kernel. Limits in /etc/login.defs have been raised, /usr/sbin/useradd is working properly.
     
  4. sbonner

    sbonner Member

    Joined:
    Jul 1, 2012
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    And yes, cpanel suffers from lack of memory when wwwacct or killacct are invoked from command line. When these scripts get called remotely via API call they work just fine.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    And I will bet it's failing due to memory on reading /etc/group file.
     
  6. sbonner

    sbonner Member

    Joined:
    Jul 1, 2012
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Sure it is. And what about my previous post #3 in this thread?
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If the system is failing in memory, it is the OS that is failing to have sufficient memory. Where did you ask about cPanel and how many users besides the fact that it was mentioned that the limitations that I mentioned before your post still come into play? You'll either need to find a way around the memory limit, increase the memory or get a new machine for the additional users.

    Hosts can offer unlimited space to users, but there is a space limitation when they do it. You can add an unlimited number of users, but the system has a memory limitation.
     
  8. sbonner

    sbonner Member

    Joined:
    Jul 1, 2012
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Let me explain. This is a 24gb ram machine with clustered storage attached to it. At the moment i write this, it has exactly 58552 user listed in /etc/userdomains. When i issue 'groupadd -g 60001 test; useradd -g 60001 test' --- it works. But when latest line in /etc/passwd uses GID equal to 60000, cpanel fails to create accounts with "Could not allocate a group id" error, despite that manually i still can add users into system via useradd/groupadd.
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Manually adding a user takes less resources than creating a cPanel user would do, because cPanel has to read in far more files before adding the user. I realize it's a large system, but the memory limitation is still valid under that scenario.

    I don't know what other recourse you would have besides either removing users you don't need on the system or getting a new system for more users. You are welcome to wait until it is a weekday and you have more likelihood of a developer reading this thread. I might suggest revising your initial post to be more specific on what is happening. You were obviously aware of what we've discussed and provided far more details during the additional posts than were provided initially. It might make it easier to have those specifics in that first post so that you get a response.
     
  10. sbonner

    sbonner Member

    Joined:
    Jul 1, 2012
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    I will definitely update my first post with complete step-by-step guide on how to reproduce the problem as soon as the server gets filled up.
     
  11. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Linux 2.2 could only handle 65,536 users. When the user handling code was written, we reserved a percentage of uids/gids for package installs, etc. While its certainly possible to add additional users on newer kernels, haven't had a request to make it happen before. The best way forward would be to open a ticket using the link in my signature below (be sure to reference this thread). We can then examine your system and determine the best way forward to add support for additional uids/gids.
     
  12. sbonner

    sbonner Member

    Joined:
    Jul 1, 2012
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Many thanks to developers, i'll let you know once i reach this limit!
     
Loading...

Share This Page