Extremely slow to create a new siteworx account

I am using Soap calls, but it takes anything between 24 and 100 seconds to finish the creation of the account. This makes it really difficult to allow clients to pay and then instantly activate their accounts.

Is there any reason it is this slow? Is there something I can do to improve it?

I’ve tried all of the advice here on stackoverflow (cant share link on forum unfortunately)

My calls only work if I increase the timeout to 200 seconds. So the calls work, they just take extremely long for some reason. And sometimes those times vary greatly.

Here is the code I ended up using:

$this->soapClient = new \SoapClient( 'https://'.$this->hostname.':2443/soap?wsdl' , array(
        'connection_timeout' => $timeout,
        'trace' => true,
        'cache_wsdl' => WSDL_CACHE_NONE,
        'keep_alive' => false,
        'compression'   => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE,
        'user_agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0',
      ));

And the actual call:

$input = array(
      'master_domain' => $domain,
      'uniqname' => $username,
      'password' => $password,
      'confirm_password' => $password,
      'packagetemplate' => $plan,
      'email' => $email,
      'encrypted' => 'n',
      'master_domain_ipv4' => $masterIpAddress,
    );
    $key = $this->accessHash;
    $api_controller = '/nodeworx/siteworx';
    $action         = 'add';
    $client = $this->getSoapClient();
    $result = $client->route( $key, $api_controller, $action, $input );

Any ideas as to why this is so slow?

It looks like this might not be a code issue. If I simply log in on Nodeworx and try to create a new account, it takes 40 seconds minimum. Is that normal?

Hi rockstardev

Welcome to IW forums

It is not something I have ever measured myself until now, and it depends upon many factors at the time of creation, such as server load, server specs etc…

I tested on 2 servers, 1 is heavily used and the other light to medium usage. The heavily used creation time was circa 30 - 35 seconds whilst the light to medium was circa 10 seconds. However, server specs are not matched on the 2 servers but only by the drive types. (hybrid/SSD to full SSD)

I hope that helps a little

Many thanks

John

1 Like

Hello–

Depending on the load and traffic on the server, that can be normal, yes. I’ve seen it take about that long on customer servers, before, especially ones with many accounts, or where there was a lot of activity. Part of the account creation process reloads/restarts all PHP versions and Apache. Depending on the number of accounts, that process may add a few seconds, as it looks through all of the vhosts on the server to make sure everything is correct.

If you’d like us to take a direct look for you, you can submit a support ticket to support.interworx.com. But, again, if you do have a lot of accounts on your server, or there is a lot of traffic, that does not seem out of the ordinary.

Thanks,
-Jenna
Friendly Neighborhood InterWorx Support Manager

If you have a lot of accounts (500+) the primary issue is how we add logging to every vhost. Creates a lot of overhead when restarting. If you’re on Interworx v7 you could change your default apache template to exclude the apache per vhost logging. Logs are typically not needed unless you want web statistics processed locally. You can enable per domain if needed for troubleshooting.

If you need our help with this please open a support ticket.

There has also been the odd other, seemingly unrelated issue that can lead to long account add times, so if you only have a few accounts and your server is not overloaded please let us know so we can look into it.

We have been wanting to look into handling apache logging via split logging but there have been so many other priorities.

My problem is this. A client places an order on my website for Interworx hosting. He then goes to the payment page. Upon payment, I execute the api call to create the account. Now the client has to wait 25 seconds to 90 seconds. This cannot and doesn’t work during a checkout. 25 seconds is UNREASONABLE. It does not happen with cPanel and plesk.

So what must I do? It looks like my only choice is to run a separate process after the user places the order which can then create the account.

But this really sucks. 24 seconds is unacceptable. It should be a high priority bug. I am surprised more people using WHMCS haven’t complained.

Hi

We use WHMCS and it’s never been an issue for us, from users to resellers

Have you opened a support ticket with IW to let them have a look

Many thanks

John

It is 100% for sure not WHMCS related. If I create a new account by just logging into the server, it takes 24 seconds. So I am guessing that you need major hardware requirements to get that speed down.

Either way, I am not getting 24 seconds with cpanel and plesk, so again, it is an interworx problem.

We have nodeworx/siteworx V7 on multiple servers

We use WHMCS and have only noticed this issue occurring when on a low powered machine 2vcpu 3gb ram once it got over 5 accounts it began taking as you said time to create.

Have also noticed similar issue when using whm/cPanel on smaller virtual machines 2core 3gb ram or less

It is only a slight delay so we have become accustomed to it until those machines become financial enough to support more resources
Again we have only seen this once you get over around 5 accounts on low powered virtual machines

If it gets fixed great if not is of no dramatic effect to us

1 Like

Hi

@rockstardev - sorry no one is disputing that it is related to IW and WHMCS is not an issue!

Hardware wise, it may speed up the time but will not overcome the small delay as @IWorx-Jenna and @IWorx-Joseph have already provided insights as to the cause of this and @GoGreenDomains and myself have posted, is not a major deal breaker for any of our clients.

You have not shared what server specs you are running on and if low powered, I would expect any sites using resources would slow your server down. IW list minimum specs but these are minimum specs

Have you opened a support ticket with IW

FYI I do not work for IW so my views are my own and not always correct

Many thanks

John

Our specs:

  • 6 vCPU
  • 8 GB Ram
  • 200 GB Disk

24 seconds seems a lot for those specs. We are bumping the ram up to 12GB to see if we can get the 24 seconds down to under 10. That would be acceptable and decent!

Also, there are 243 accounts on the server.

i think it boils down to the product offering that you have. As your clients expectations maybe different to ours
what i can say is those resources are going by our standards. No where near enough.

6-8 core maybe ok 8gb ram would be a bottle neck for our product expectation.
Again this does depend on what your offering your clients.

depending on the types of usage that your seeing within your client base i would be inclined to suggest a minimum spec for a vps to be 6-8 core 16gb ram 400gb disk
and again i cant stress enough it comes down to what your client base is doing with the existing accounts and what the expectation is for the product your offering.

also another thing thing to note is 1 virtual core is not always the same as another even discussing it in basic terms a single core can be 1.5ghz or 2.5ghz or even higher so it maybe 6 core but if there 1.5ghz cores then its no where near going to have the same throughput capacity as a vps with 6 x 2.5ghz cores
keep in mind there is also other factors to determine core performance this is just a very simple example.

Thanks for this! We are going to try upping the specs and comparing how long it takes. Will report back.

Hoping it doesn’t require a monster of a server to get that time down to under 10 seconds. :crossed_fingers:

@rockstardev if you don’t mind disabling per vhost apache logs I’m happy to help you out with that. I’d at least like to confirm if that is the primary delay or if its load related.

I might have some other ideas on speeding up account creation. But I need to play around on a test box for that.

I’m going to see if I can find my old notes on split logging too. As well as see if there is any new information on it. I recall running into an issue just before I had to work on something else but I don’t recall if it was something that could be worked around.

Due to our template system in v7 it’s pretty easy to disable or set up custom logging.

Hi @IWorx-Joseph I am helping @rockstardev troubleshoot this on the server, I would like to proceed with disabling logging temporarily and run a few tests to see what the time is when creating a few accounts via WHMCS and re-enabling it again. Can you let me know what the correct steps are in doing so?

The problem with that, as I understand, means we get no logs in the event we need to troubleshoot an issue on any of the domains. Therefore, this will not be a viable solution but is good to know for testing to confirm if there’s any notable difference.

For what it’s worth we upped the server specs a tad bit to see if it may help.

Initially, our server specs were at:

6 vCPU
8 GB Ram
200 GB Disk

However, we went ahead and slightly increased it to the following now:

7 vCPU
10 GB Ram
200 GB Disk

Keep in mind, we have a 16 Core Xeon CPU @ 2.10GHz and we only use a total of 32 virtual cores for our VPS servers meaning we’re in no way impacting our CPU to degrade performance. The server is mainly used for both email and web hosting. However, I can assure you the majority of the accounts run basic WordPress sites.

After the server upgrade, I ran three account creation tests via WHMCS, all three tests took about one minute to complete, and this was the server usage for two of the tests:

Test 1:

top - 15:10:47 up 3 days,  6:18,  2 users,  load average: 0.39, 0.33, 0.28
Tasks: 1095 total,   2 running, 1093 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.7 us,  0.5 sy,  0.0 ni, 98.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  9930420 total,  2460172 free,  3675592 used,  3794656 buff/cache
KiB Swap:  6242296 total,  5852152 free,   390144 used.  5589144 avail Mem

Test 2: Right before test two, I gave the server a reboot to make sure the upgrade took effect.

top - 15:16:25 up 3 min,  1 user,  load average: 0.57, 0.48, 0.20
Tasks: 1068 total,   1 running, 1067 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.8 us,  0.4 sy,  0.0 ni, 98.6 id,  0.1 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  9930428 total,  4385144 free,  2964236 used,  2581048 buff/cache
KiB Swap:  6242296 total,  6242296 free,        0 used.  6469012 avail Mem

So Yeah, even if I do increase more CPU and more RAM I am fairly certain our results will stay the same. Keep in mind, the WHMCS instance and the server are within the same ISP so its not like latency can have a big play here too.

I have a blog draft for the interworx 7 upgrade that covers a lot of what you will need. I can PM that if needed but I have found something else that may help more in your case and I think we should test this first.
Add the following to your CLI or API parameters
–restart_httpd 0

Then restart apache gracefully, apachectl graceful

We will still need to figure out how to append a graceful restart to your cart process. But lets see if adding restart_httpd 0 to your account create call speeds things up.

If you end up needing to use restart_httpd 0 but cannot easily append an async graceful restart. There is an automated check built into our 5min cron that will restart apache gracefully if it detects that there are unapplied IW apache configuration changes. But that’s up to 5min of the site not working after creation.