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?