从 .Net 调用 Magento API 并获取“位于 XYZ 的 HTTP 服务太忙”消息错误

发布于 2024-10-19 23:57:10 字数 1585 浏览 1 评论 0原文

我目前正在致力于 .Net 应用程序和 Magento v 1.3.2.4 之间的集成。 .Net 应用程序有一个对 Magento API 的服务引用,并且在大多数情况下似乎工作正常。如果我尝试提取所有订单的列表,则会出现以下异常。

“位于 MAGENTO API 的 HTTP 服务太忙。”

如果我设置 pageSize 过滤器并将请求限制为 500 条记录,则效果很好。是否是请求/响应太大,服务器/客户端配置需要更新?我的服务参考配置粘贴在下面。我不确定在 PHP/Magento 端哪里可以检查 Web 服务的配置,并且在 Magento 管理屏幕中没有找到任何看起来有帮助的内容。

有人对从哪里开始解决此问题有任何建议吗?

<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" />

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: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" />

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

邮友 2024-10-26 23:57:10

如果您有很多订单,那么您将无法在不耗尽内存的情况下将其全部拉出。您可能必须将其分解并分成 500 块进行,因为这个数字对您有用。

您可以尝试提高 PHP 的 memory_limit 和 max_execution_time 设置,但您确实不应该尝试一次将它们全部拉出。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文