【发布时间】:2016-05-13 21:56:10
【问题描述】:
我有一个训练有素的模型,我可以轻松部署它。但是,查询 API 会收到响应:
服务器无法及时响应您的请求
一个简单的谷歌搜索(和过去的经验)告诉我这是 Spray 告诉我响应时间太长了。我希望能够增加超时,但我找不到如何配置引擎。
知道如何更改引擎使用的配置吗?
【问题讨论】:
标签: scala spray predictionio
我有一个训练有素的模型,我可以轻松部署它。但是,查询 API 会收到响应:
服务器无法及时响应您的请求
一个简单的谷歌搜索(和过去的经验)告诉我这是 Spray 告诉我响应时间太长了。我希望能够增加超时,但我找不到如何配置引擎。
知道如何更改引擎使用的配置吗?
【问题讨论】:
标签: scala spray predictionio
# The time after which an idle connection will be automatically closed.
# Set to `infinite` to completely disable idle connection timeouts.
idle-timeout = 60 s
# If a request hasn't been responded to after the time period set here
# a `spray.http.Timedout` message will be sent to the timeout handler.
# Set to `infinite` to completely disable request timeouts.
request-timeout = 20 s
还有其他一些与超时相关的设置,您可能需要调整。
【讨论】:
pio train 的配置之外的配置
spray.can { server { request-timeout = 20 s }} 的东西放到src/main/resources/application.conf 上,它应该可以工作。您使用的是哪个引擎模板?