增加 Ember 服务器中的请求超时

Increase request timeout in Ember server

在 Ember 服务器 ("ember serve") 中使用我的 Ember 应用程序时,任何超过 1.00 分钟的请求都会失败并出现 502 错误。但是,当我构建我的应用程序并使用我的本地 Apache 服务器时,请求不会在几分钟内失败。

如何增加 Ember 服务器中的请求超时?我在任何地方都看不到设置此值的任何选项,也找不到任何类型的在线文档。

以下内容可能有所帮助。

如此处指定,您可以在适配器中 ajaxOptions 返回的散列中添加 ms 中的 timeout

https://discuss.emberjs.com/t/how-to-set-ajax-timeout-for-ember-rsvp-or-store-findrecord/8386/4

他们还提到了 If

的限制

If Ember stop receiding from Jquery, this will not be an option.

我自己解决了这个问题。毕竟 Ember 服务器不是问题。问题是我的 ember 代理指向一个 Apache 服务器,后者又代理 API 服务器。 Apache ProxyPass 设置缺少超时参数,因此默认为 60 秒。我需要在我的 httpd.conf 文件中为我的 ProxyPass 设置添加超时,如下所示:

ProxyPass /api https://localhost:8081/api timeout=180