Announcement

Collapse
No announcement yet.

SOAP API randomly times out

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SOAP API randomly times out

    Hello
    I have been using the SOAP API with no issue for years, but now I am getting timeout errors sporadically. Has something changed on 3dcart's end? Do they not support SOAP v1.1 anymore? I am using PHP scripts. My connection settings are:
    $client = new soapclient('http://api.3dcart.com/cart.asmx?WSDL', array('trace' => 1,'soap_version' => SOAP_1_1));

    My php.ini timeout variable is set to 60s which is plenty

    A basic product inventory update would be
    $param = array(
    'storeUrl'=>"www.[my_store].com.au",
    'userKey'=>"XXXXXX",
    'productId' => "[SKU]",
    'quantity' => "$qty",
    'replaceStock' => "true",
    'callBackURL' => ""
    );

    $result = $client->updateProductInventory($param);

    I run these inventory updates in bulk, so it gets through 3 or so then times-out. I used to be able to do unlimited.

    Error message is

    Warning: SoapClient::SoapClient(http://api.3dcart.com/cart.asmx?WSDL): failed to open stream: Connection timed out in upord_stat.php on line 59

    Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "http://api.3dcart.com/cart.asmx?WSDL" .. on line 59

    Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://api.3dcart.com/cart.asmx?WSDL' : failed to load external entity "http://api.3dcart.com/cart.asmx?WSDL"

  • #2
    Some users in the forum have had severe connectivity issues over the past few weeks. Could be related.

    http://forums.3dcart.com/forum/3dcar...124-store-down

    Comment


    • #3
      yeah 2 weeks is about how long I have been experiencing connection issues. One of the 3 SOAP servers was pingable but you couldn't access the api URL through the browser. Just returned a 404 error. That server has since been removed from the DNS. Didn't fix the issue though.
      DDOS attacks may be it.
      I wonder if I rewrite my scripts to use the REST API if I will have any more luck

      Comment


      • #4
        golfbox Unlikely, I would think. It's all running at 3dCart either way... so if they go down, so does your server's connectivity to the outside, and so do the API servers, etc.

        This past week we've experienced sporadic outages twice. So far, they've been short lived... but the responses to my ticket still act like we're the only store having this issue (when we know for a fact, many stores are).

        Whatever the cause may be, there's not much we can do about it. I'd recommend writing your API calls to gracefully fail if they cannot connect, and then just try again on the next scheduled time, or have them spin and try again after a few seconds up to some maximum number of attempts (before giving up and waiting for the next scheduled time).

        With all that said, 3dCart clearly is trying to shuffle folks into the new REST API. So long-term, it may be good to try using it. I don't know how long they plan to support two API's. We currently use the SOAP API too, so you're not alone in that boat.
        Last edited by Alupis; 03-31-2016, 04:18 PM.

        Comment

        Working...
        X