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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Creating and terminating user account taking too long

Discussion in 'General Discussion' started by Havri, May 23, 2017.

  1. Havri

    Havri Well-Known Member

    Joined:
    Oct 28, 2013
    Messages:
    58
    Likes Received:
    14
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello,

    I am encountering an issue with the creation and deletion of accounts on a few servers. I removed one account using the command line. The line that the process was stuck is:



    Here is the output from the command line:

    Code:
    [root@server04 logs]# time /scripts/removeacct somethingdomain
    Are you sure you want to remove the account "somethingdomain", and DNS zone files for the user? [y/N]? y
    Running pre removal script (/usr/local/cpanel/scripts/prekillacct)......Done
    Collecting Domain Name and IP...info [removeacct] rebuild_files: working on domain (something.domain.com)
    info [removeacct] php-fpm: rebuild_files: restart fpm services for Apache
    info [removeacct] php-fpm: fpm services restarted
    ...Done
    Locking account and setting shell to nologin......Done
    Removing Sessions.........Done
    Killing all processes owned by user......Done
    Removing Suspended Info.........Done
    Removing Web Logs......Done
    Removing Bandwidth Files......Done
    Removing any unneeded pending interface locks......Done
    Removing Email Sending Limits Cache......Done
    Removing DKIM keys......Done
    Removing Crontab......Done
    Removing IPv6......Done
    Removing external authentication links …......Done
    Running AutoSSL account deletion logic …......Done
    Removing domain TLS resources …......Done
    Removing HTTP Virtual Hosts......Done
    Removing ftp Virtual Hosts......Done
    Removing user's web content directory symlinks......Done
    Removing MySQL databases and users......Done
    Revoking MySQL Privs.......Done
    Removing PostgreSQL databases and users......Done
    Removing Two-Factor Authentication entries..........Done
    Removing API Token entries..........Done
    Removing User & Group..........Done
    Removing DNS Entries......Done
    Removing Email Setup......Done
    Removing mailman lists......Done
    Updating Databases......Done
    Removing bandwidth limits......Done
    Removing Counter Data......Done
    Adding IP back to the IP address pool......Done
    Removing user's cPanel Databases & Updating......Done
    Reloading Services......Done
    Removing mail and service configs......Done
    Sending Contacts......Done
    Updating internal databases......Done
    Running post removal scripts (/usr/local/cpanel/scripts/legacypostkillacct, /usr/local/cpanel/scripts/postkillacct)......Done
    Account Removal Complete!!!......Done
    info [removeacct] User 'somethingdomain' removed.
    User: somethingdomain
    Domain: something.domain.com
    Removed the following non-SSL virtual hosts: something.domain.com
    Removed the following SSL virtual hosts:
    
    Listing MySQL dbs for removal.
    Fetching MySQL DB Owner information.
    
    Successsomething.domain.com => deleted from server04.
    something.domain.com => deleted from dns2.
    
    something.domain.com => deleted from dns1.
    
    Removing /etc/valiases/something.domain.com
    System has 8 free ips.
    
    somethingdomain account removed
    
    real    1m57.376s
    user    0m0.615s
    sys    0m0.419s


    The same thing applies when creating new accounts. I've added a screenshot from the WHM interface that shows the same httpd.conf problem.

    Is anybody experiencing the same issue? Is there a solutions to this? The problem is not reproducible each time. Sometimes it takes 10 seconds, sometimes 100.

    Thank you.
     
  2. webhostuk

    webhostuk Well-Known Member

    Joined:
    Sep 11, 2013
    Messages:
    112
    Likes Received:
    11
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    If its not for all account that you delete then make user to check if there are some files or folder with chattr permission set.
    While creating account did you check the server load? if there load is high even that can cause slow creation of account.
     
  3. Havri

    Havri Well-Known Member

    Joined:
    Oct 28, 2013
    Messages:
    58
    Likes Received:
    14
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello,

    This applies even if I create a new account and then try to delete it, so there is no selective treatment only for some users (no chattr permission set). The account is new, so this means no chattr and no load on server (as there are only a few users). My `uptime` command outputs the following:

    Code:
     13:44:20 up 89 days,  1:50,  2 users,  load average: 0.90, 0.95, 0.99
    Thanks.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you verify which version of cPanel is installed on this system? You can check with the following command:

    Code:
    cat /usr/local/cpanel/version
    Thank you.
     
  5. Havri

    Havri Well-Known Member

    Joined:
    Oct 28, 2013
    Messages:
    58
    Likes Received:
    14
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello,

    Sorry for the delayed answer. The version is:

    11.64.0.22

    I just recreated the account and removed it. Both operations were done from the command line. It took over 1 min to erase one empty account. The server runs only SSDs, so there isn't an I/O bottleneck.


    Code:
    [root@server04 ~]# time /scripts/removeacct subdomain
    Are you sure you want to remove the account "subdomain", and DNS zone files for the user? [y/N]? y
    Running pre removal script (/usr/local/cpanel/scripts/prekillacct)......Done
    Collecting Domain Name and IP...info [removeacct] rebuild_files: working on domain (subdomain.mydomain.com)
    info [removeacct] php-fpm: rebuild_files: restart fpm services for Apache
    info [removeacct] php-fpm: fpm services restarted
    ...Done
    Locking account and setting shell to nologin......Done
    Removing Sessions.........Done
    Killing all processes owned by user......Done
    Removing Suspended Info.........Done
    Removing Web Logs......Done
    Removing Bandwidth Files......Done
    Removing any unneeded pending interface locks......Done
    Removing Email Sending Limits Cache......Done
    Removing DKIM keys......Done
    Removing Crontab......Done
    Removing IPv6......Done
    Removing external authentication links …......Done
    Running AutoSSL account deletion logic …......Done
    Removing domain TLS resources …......Done
    Removing HTTP Virtual Hosts......Done
    Rebuilding Mail SNI configuration......Done
    Removing ftp Virtual Hosts......Done
    Removing user's web content directory symlinks......Done
    Removing MySQL databases and users......Done
    Revoking MySQL Privs.......Done
    Removing PostgreSQL databases and users......Done
    Removing Two-Factor Authentication entries..........Done
    Removing API Token entries..........Done
    Removing User & Group..........Done
    Removing DNS Entries......Done
    Removing Email Setup......Done
    Removing mailman lists......Done
    Updating Databases......Done
    Removing bandwidth limits......Done
    Removing Counter Data......Done
    Adding IP back to the IP address pool......Done
    Removing user's cPanel Databases & Updating......Done
    Reloading Services......Done
    Removing mail and service configs......Done
    Sending Contacts......Done
    Updating internal databases......Done
    Running post removal scripts (/usr/local/cpanel/scripts/legacypostkillacct, /usr/local/cpanel/scripts/postkillacct)......Done
    Account Removal Complete!!!......Done
    info [removeacct] User 'subdomain' removed.
    User: subdomain
    Domain: subdomain.mydomain.com
    Removed the following non-SSL virtual hosts: subdomain.mydomain.com
    Removed the following SSL virtual hosts: subdomain.mydomain.com
    
    Listing MySQL dbs for removal.
    Fetching MySQL DB Owner information.
    
    Successsubdomain.mydomain.com => deleted from server04.
    subdomain.mydomain.com => deleted from dns2.
    
    subdomain.mydomain.com => deleted from dns1.
    
    Removing /etc/valiases/subdomain.mydomain.com
    System has 8 free ips.
    
    subdomain account removed
    
    real    1m7.879s
    user    0m0.627s
    sys    0m0.384s
    


    Thank you.
     
    #5 Havri, May 24, 2017
    Last edited: May 24, 2017
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  7. Havri

    Havri Well-Known Member

    Joined:
    Oct 28, 2013
    Messages:
    58
    Likes Received:
    14
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello,

    The ticket # is 8520305.

    Thank you.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    To update, it looks like the delay stems from CageFS functionality taking an extended amount of time during the account termination process.

    Thank you.
     
  9. Havri

    Havri Well-Known Member

    Joined:
    Oct 28, 2013
    Messages:
    58
    Likes Received:
    14
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello,

    I also replied to the cPanel ticket and I don't think that CageFS is the one that delays the account termination. Please see my answer from the ticket.

    Regards.
     
Loading...

Share This Page