restheart - connections not closed

时间:2016-04-15 15:18:06

标签: mongodb restheart

Is there a way to set a timeout on connection from restheart to mongodb? Looking on the server it seems there is a large number of connections that stay open for an extended period of time. We are using restheart 1.1 and mongodb 3.2.

I noticed there are a couple of settings added in the documentation for restheart 2.0 (IDLE_TIMEOUT, NO_REQUEST_TIMEOUT) but these are not in the 1.X documentation and 2.0 is currently in Beta.

1 个答案:

答案 0 :(得分:1)

添加到restheart 2.0的连接选项与传入的HTTP请求有关,而与restheart和mongodb之间的连接无关。

要将连接选项设置为mongodb,您可以在mongo-uri配置选项中指定它们。

有关详细信息,请参阅mongodb文档中的connection string options