PHP SoapClient call generates an ERR_NO_RESPONSE in browser and then a page reload

I am using the SOAP API (Interworx API - http://docs.interworx.com/interworx/api/index-Using-the-API.php#toc-Chapter-2) and when the SOAP call executes successfully I receive an ‘ERR_NO_RESPONSE’ or ‘Unable to connect’ or similar message in my browser (Chrome or Safari or Firefox). When the SOAP command does not succeed, the page works fine and I receive the appropriate return array in $result.

The call is:

$client = new SoapClient($interworx_soap_url);
$result = $client->route($api_key, $api_controller, $action, $input);

The $client->route() command is creating a new domain pointer in my control panel.

Interestingly, the API call always works (the domain pointer is created), but somehow it is interrupting my code execution. I have tried adding an ob_start() and ob_clean() around these lines but it makes no difference.

So when my command $client->route() is successful (it creates a new domain pointer), it causes the problem (code execution stops) in my browser but when the command is not successful (like when the domain pointer already exists) it works fine (returns the status array with the error message).

Any help solving or isolating the problem would be greatly appreciated. Incidentally, this problem does not generate any messages in my PHP or server Apache error log. Thanks!

I think I might have figured out what was happening. I tried using the API to do list commands and other types of commands and they all worked fine. I think the problem is that when you add a pointer domain, apache is restarted just as the SOAP call is taking place. That is why it worked when the route() command did not create a new domain. Still does not help me fix the problem, but at least I might be on to something…

Hi Craig

Kudos to you

Please remember soap was updated I think, so there maybe a small difference perhaps. I could be wrong though and thinking of smarty update

There is a setting in nodeworx, services, web server for soft restart of Apache (sorry I cannot remember the actual name), which may help

Many thanks

John

John,

The “Force Graceful Restart:” setting did the trick - thank you for that - much better solution than the crazy stuff I was trying.

Craig

could you solve something similar happens to me

It’s going to help a lot