Has anyone seen this before where Magento's order.list call returns valid SOAP Response Headers but an empty Response?
And the worst part is that subsequent calls with the same from/to range succeed, but upon the initial connection process (it executes 5 or 6 successful queries before failing), it fails consistently.
2013-03-06T19:01:30+00:00 DEBUG (7): message="Error Fetching http headers - full exception logged in exception.log, Soap last request and response logged in st.log"
2013-03-06T19:01:30+00:00 DEBUG (7): message="SoapClient::__getLastRequest(): <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3
.org/2001/XMLSchema-instance" xmlns:ns2="http://xml.apache.org/xml-soap"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:call><sessionId xsi:type="xsd:string">SCRUBBED</sessionId><resourcePath xsi:type="xsd:string">order.list</resourcePath><args SOAP-ENC:arrayType="ns2:Map[1]" xsi:type="SOAP-ENC:Array"><item xsi:type="ns2:Map"><item><key xsi:type="xsd:string">updated_at</key><value xsi:type="ns2:Map"><item><key xsi:type="xsd:string">from</key><value xsi:type="xsd:string">2012-05-15 07:01:04</value></item><item><key xsi:type="xsd:string">to</key><value xsi:type="xsd:string">2012-06-24 19:01:04</value></item></value></item></item></args></ns1:call></SOAP-ENV:Body></SOAP-ENV:Envelope>
"
2013-03-06T19:01:30+00:00 DEBUG (7): message="SoapClient::__getLastRequestHeaders(): POST /index.php/api/soap/index/ HTTP/1.1
Host: domain.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.3.3
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:Mage_Api_Model_Server_HandlerAction"
Content-Length: 1023
Cookie: SERVERID=A;
"
2013-03-06T19:01:30+00:00 DEBUG (7): message="SoapClient::__getLastResponseHeaders(): HTTP/1.1 200 OK
Date: Wed, 06 Mar 2013 19:01:26 GMT
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.3.3
Content-Length: 2364630
Content-Type: text/xml; charset=UTF-8
"
2013-03-06T19:01:30+00:00 DEBUG (7): message="SoapClient::__getLastResponse(): "
I've got developer mode on, display errors on, logging on, and no exceptions are being logged on the SOAP Server side. This test Magento instance has 3k customers and around the same number of orders.
I also tried the suggestion noted here (https://stackoverflow.com/questions/12906775/magento-soap-api-php-exception-thrown-for-login-method-call-looks-like-we-go) and that didn't fix it.
One unique thing about this particular Magento instance is that the customer created_at dates and order dates were randomized using a quick MySQL query using RAND() - as opposed to iterating over proper customer/customer models and setting the created_at dates and save()'ing, so I suppose it's possible because there's some kind of inconsistency internally in the customer entity.
I've seen the same issue occur with orders and customers, but the responses posted here are for the order.list query specifically.
When tested against a real Magento instance of roughly the same size, this did not occur.
try/catchsomewhere withoutMage::logException. If it fails constantly it is reproduceble, right? Then you can debug it :) How do you fix the problem? Restarting the apache/nginx? – Fabian Blechschmidt Mar 07 '13 at 07:21