I've been running into this issue multiple times now—whenever I either,

  1. Delete the cache folder for Magento (in my case, /tmp/magento/var/cache/);
  2. Turn off WSDL caching in Magento (under System > Configuration > Services > Magento Core API > Enable WSDL Cache); and/or,
  3. Turn off WSDL caching from the SOAP client's side (via PHP)

I keep hitting a connection timeout error reaching the SOAP server, whether 2, 3 or more minutes.

I've been testing the SOAP client calls with a PHP script from my local server (localhost, Mac with Homebrew—running Nginx/PHP 7.1), while I'm running Magento in a Vagrant instance (Ubuntu, running Apache2 + PHP 7.0—on Currently my test script:

ini_set('max_execution_time', 300);
ini_set('default_socket_timeout', 300);
ini_set("soap.wsdl_cache_enabled", 0);

// Forwarding the Vagrant/Magento server over
$client = new SoapClient('', array(
    'trace' => 1,
    'connection_timeout' => 180

// Timeout happens here at the line below:
$sessionId = $client->login('testuser', '123456');

$result = $client->catalogProductCustomOptionList($sessionId, 39);
$resultXml = $client->__getLastResponse(); ?>

If I call directly in my browser, it loads fine—but apparently not in the script.

Any clues?

  • Is your site really active? See the test done on this site wsdlbrowser.com does not load. I believe it is locked for external access. – Mestre Magento Jan 8 '18 at 16:28
  • Sorry, meant to clarify, is my local Vagrant instance. – Jonathan Jan 9 '18 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.