Aaron Todd

Member
Mar 13, 2015
5
2
3
mICHIGAN
cPanel Access Level
DataCenter Provider
Hello,

I have a server running 58.0.32. I have been using the WHM API1 createacct function to automate account creation, and the past few days its been causing a bit of trouble. I am connecting to the API using PHP via the XML-API class (GitHub - CpanelInc/xmlapi-php: A PHP Class for Interacting with cPanel's XML-API). Here is an example snippet:

Code:
include_once '../include/xmlapi.php';

$xmlapi = new xmlapi($host);
$xmlapi->set_port(2087);
$xmlapi->password_auth($my_user, $my_pass);
$xmlapi->set_output('array');
$xmlapi->set_debug(0);

$newAccount = array(username => "example",
                    password => "pass",
                    domain => "example.example.com",
                    pkgname => "Default",
                    contactemail => "[email protected]");

$account_status = $xmlapi->createacct($newAccount);
The code does eventually complete, but it seems to be taking an extremely long time to respond. It didn't seem to always act this way.

Can anyone confirm this? Does anyone know if something recently changed in the API that would cause it to take a bit longer to complete?

Thanks in advance...
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @Aaron Todd,

I've not seen additional reports of this problem, but if you'd like, you can open a support ticket using the link in my signature so we can take a closer look.

That said, have you had a chance to test this on a server running cPanel version 60? Improved account creation speed is one of the most popular enhancements we've added:

Account creation performance improvement
We improved the account creation process performance due to more efficient handling of the BIND database. Also, we no longer use the operating system's useradd and userdel routines. You will see significantly reduced creation times for accounts.
We greatly improved account creation and account termination performance. On average account creation time in version 60 is now under one second, which is up to ten times faster!
Version 60 is planned for publication to the "Release" build tier this week.

Thank you.
 

Aaron Todd

Member
Mar 13, 2015
5
2
3
mICHIGAN
cPanel Access Level
DataCenter Provider
@cPanelMichael,

Thank you for your response.

After additional troublshooting I have found that every time I run my PHP script these errors pop in the CPANEL event_log file:

[Wed Nov 02 11:51:32.949848 2016] [mpm_worker:notice] [pid 13700:tid 139682544236480] AH00297: SIGUSR1 received. Doing graceful restart

[Wed Nov 02 11:51:37.003031 2016] [ssl:warn] [pid 13700:tid 139682544236480] AH01906: _wildcard_.viebit.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)

[Wed Nov 02 11:51:37.131023 2016] [lbmethod_heartbeat:notice] [pid 13700:tid 139682544236480] AH02282: No slotmem from mod_heartmonitor

[Wed Nov 02 11:51:37.133233 2016] [:notice] [pid 13700:tid 139682544236480] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)

[Wed Nov 02 11:51:37.133248 2016] [:notice] [pid 13700:tid 139682544236480] mod_bw : Version 0.92 - Initialized [0 Confs]

[Wed Nov 02 11:51:37.278325 2016] [mpm_worker:notice] [pid 13700:tid 139682544236480] AH00292: Apache/2.4.23 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 mod_fcgid/2.3.9 configured -- resuming normal operations

[Wed Nov 02 11:51:37.278356 2016] [core:notice] [pid 13700:tid 139682544236480] AH00094: Command line: '/usr/local/apache/bin/httpd'
The only other big change that has been made recently is that my host changed the Apache MPM from EVENT to WORKER. I am going to have them revert this tonight and see what happens.

Also, no I haven't tried v60 yet. If my plan for tonight doesnt render good results I'll attempt to update and see what happens and/or open an official ticket.

Thanks again for getting back with me!
 
  • Like
Reactions: cPanelMichael

Aaron Todd

Member
Mar 13, 2015
5
2
3
mICHIGAN
cPanel Access Level
DataCenter Provider
@cPanelMichael,

Just for the sake of someone elses sanity, I wanted to report that the Apache WORKER MPM seemed to be the cause of my problems. I'm not sure if its the multi-threaded aspect that doesn't play nice with PHP and/or the CPANEL daemon, but reverting back seemed to make things happy again.