我使用以下代码将一些数据发布到服务器
def post(endpoint: String, entity: Strict) = {
Http().singleRequest(HttpRequest(uri = Notifier.notificationUrl + endpoint, method = HttpMethods.POST,
entity = entity)) onComplete {
case Success(response) => response match {
case HttpResponse(StatusCodes.OK, _, _, _) =>
log.info("communicated successfully with Server")
}
case Failure(response) =>
log.error("communicated failed with Server: {}", response)
}
}
每次演员收到如下消息10 seconds
时都会调用它Notifier
case ecMonitorInformation: ECMonitorInformation =>
post("monitor", httpEntityFromJson(ecMonitorInformation.toJson))
问题?
我看到最初(围绕5
发送到服务器的请求),但后来它挂了,我没有看到任何日志记录,服务器没有收到任何数据。在客户端一段时间后,我看到以下内容
ERROR c.s.e.notification.Notifier - communicated failed with Server: java.lang.RuntimeException: Exceeded configured max-open-requests value of [32]
到底是怎么回事?我该如何解决这个问题?