从。net调用Magento API,并得到“位于XYZ的HTTP服务太忙”的错误。

时间:2021-05-15 20:29:26

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.

我目前正在开发。net应用程序和Magento v 1.3.2.4之间的集成。net应用程序对Magento API有一个服务参考,在大多数情况下似乎都可以正常工作。如果我试图拉出所有订单的列表,我将得到以下异常。

"The HTTP service located at MAGENTO API is too busy."

位于MAGENTO API的HTTP服务太忙了。

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.

如果我设置一个pageSize过滤器,并将请求限制为500条记录,那么它可以正常工作。可能是请求/响应太大,需要更新服务器/客户端配置吗?我的服务引用配置粘贴在下面。我不知道在PHP/Magento中应该到哪里去检查web服务的配置,也没有在Magento管理屏幕中找到任何有用的东西。

Does anyone have any advice on where to start troubleshooting this?

有谁对在哪里开始解决这个问题有什么建议吗?

<basicHttpBinding>
<binding name="Mage_Api_Model_Server_V2_HandlerBinding" closeTimeout="00:01: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" />

1 个解决方案

#1


1  

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.

如果你有大量的订单,你就不能在没有内存的情况下把它们全部拉出来。你可能需要把它分解成500块,因为这个数字对你有用。

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.

您可以尝试增加PHPs memory_limit和max_execution_time设置,但是您真的不应该尝试一次将它们全部删除。

#1


1  

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.

如果你有大量的订单,你就不能在没有内存的情况下把它们全部拉出来。你可能需要把它分解成500块,因为这个数字对你有用。

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.

您可以尝试增加PHPs memory_limit和max_execution_time设置,但是您真的不应该尝试一次将它们全部删除。