2016-05-13 40 views
0

我有一个训练有素的模型,可以毫不费力地部署。然而,查询API将收到的响应:预测IO:为引擎配置超时

服务器无法产生对你的要求

一个简单的谷歌搜索(和过去的经验)的及时反应告诉我,这是喷雾告诉我答复时间太长。我想能够增加超时但我找不到如何配置引擎。

任何想法如何我可以改变引擎使用的配置?

回答

1

Spray documentation

# 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 

还有其他一些超时相关的设置,你可能需要调整。

+0

我该在哪里放置这个配置?在src/resources下的application.conf中? pio文档没有提到可以传递给'pio train'的配置以外的配置。 –

+0

@JakeGreene通常,您应该将类​​似'spray.can {server {request-timeout = 20 s}}'的东西放到'src/main /资源/ application.conf',它应该工作。你正在使用哪个引擎模板? – TeWu