Calling Magento API from .Net and getting a "The HTTP service located at XYZ is too busy" error
I am currently working on an integration between a .Net app and Magento v 1.3.2.4. The .Net app has a Service Reference to the Magento API and seems to be working fine in most cases. If I try to pull a list of all orders, I get the following exception.
"The HTTP service located at MAGENTO API is too busy."
If I set a pageSize filter and limit the request to 500 records, it works fine. Could it be that the request/response is too large and either the server/client configuration needs to be updated? My service reference config is pasted below. I'm not sure where to look on the PHP/Magento side to check the configuration of the web services and haven't found anything in the Magento admin screens that seems like it would help.
Does anyone have any advice on where to start troubleshooting this?
<basicHttpBinding>
<binding name="Mage_Api_Model_Server_V2_HandlerBinding" closeTimeout="00:0开发者_如何学JAVA1:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="524288" maxBufferPoolSize="524288" maxReceivedMessageSize="524288"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
<endpoint address="http://MagentoService.com/store/index.php/api/v2_soap/index/"
binding="basicHttpBinding" bindingConfiguration="Mage_Api_Model_Server_V2_HandlerBinding"
contract="MagentoService.Mage_Api_Model_Server_V2_HandlerPortType"
name="Mage_Api_Model_Server_V2_HandlerPort" />
If you have a lot of orders, you're not going to be able to pull them all without running out of memory. You're probably going to have to break it up and do it in chunks of 500, since that number worked for you.
You can try bumping up PHPs memory_limit and max_execution_time settings, but you really shouldn't try to pull them all at once.
精彩评论