简体   繁体   English

Drools 工作台(业务中心)请求超时

[英]Drools workbench (business-central) requests timing out

I have installed business central along with Keycloak authentication using MySQL as a database for storing Keycloak's data.我已经安装了业务中心以及使用 MySQL 作为存储 Keycloak 数据的数据库的 Keycloak 身份验证。 The business-central workbench and Keycloak server are behind Nginx.业务中心工作台和 Keycloak 服务器位于 Nginx 后面。 While working on the workbench some of the request timeout giving a 504 error code.在工作台上工作时,一些请求超时会给出 504 错误代码。 The whole business central UI freezes and the user is not able to do anything after that.整个业务中心 UI 冻结,此后用户无法执行任何操作。

The urls that error out in 504 are like: https://{host}:{port}/business-central/out.43601-24741.erraiBus?z=105&clientId=43601-24741在 504 中出错的网址如下:https://{host}:{port}/business-central/out.43601-24741.eraiBus?z=105&clientId=43601-24741

Other details about the setup are as below:有关设置的其他详细信息如下:

Java: 1.8.0_242爪哇:1.8.0_242

Business central version: 7.34.Final商务中心版:7.34.Final

Keycloak version: 9.0.0密钥斗篷版本:9.0.0

MySql: 8 mysql: 8

Java options for business central: -Xms1024M -Xmx2048M -XX:MaxPermSize=2048M -XX:MaxHeapSize=2048M业务中心的 Java 选项:-Xms1024M -Xmx2048M -XX:MaxPermSize=2048M -XX:MaxHeapSize=2048M

Note: All of this setup of mine is on a 4GB EC2 instance.注意:我的所有这些设置都在一个 4GB EC2 实例上。

Any help on this issue would be appreciated.对此问题的任何帮助将不胜感激。

EDIT: I have checked the access_log.log and it looks like the server takes more than 45 sec to process the request.编辑:我检查了 access_log.log,看起来服务器处理请求的时间超过 45 秒。 Here is a log:这是一个日志:

"POST /business-central/in.93979-28827.erraiBus?z=15&clientId=93979-28827&wait=1 HTTP/1.1" 200 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"i 45001 45.001 "POST /business-central/in.93979-28827.eraiBus?z=15&clientId=93979-28827&wait=1 HTTP/1.1" 200 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko ) Chrome/79.0.3945.130 Safari/537.36"i 45001 45.001

EDIT 2: Here is a sample request data that is sent:编辑 2:这是发送的示例请求数据:

[{"CommandType":"CDIEvent","BeanType":"org.kie.workbench.common.screens.library.api.ProjectCountUpdate","BeanReference":{"^EncodedType":"org.kie.workbench.common.screens.library.api.ProjectCountUpdate","^ObjectID":"1","count":1,"space":{"^EncodedType":"org.uberfire.spaces.Space","^ObjectID":"2","name":"Fraud_Team"}},"FromClient":"1","ToSubject":"cdi.event:Dispatcher"},{"ToSubject":"org.kie.workbench.common.screens.library.api.LibraryService:RPC","CommandType":"getAllUsers:","Qualifiers":{"^EncodedType":"java.util.ArrayList","^ObjectID":"1","^Value":[]},"MethodParms":{"^EncodedType":"java.util.Arrays$ArrayList","^ObjectID":"2","^Value":[]},"ReplyTo":"org.kie.workbench.common.screens.library.api.LibraryService:RPC.getAllUsers::94:RespondTo:RPC","ErrorTo":"org.kie.workbench.common.screens.library.api.LibraryService:RPC.getAllUsers::94:Errors:RPC"}]

The URL hit is : business-central/in.59966-45867.erraiBus?z=56&clientId=59966-45867&wait=1 URL命中是:business-central/in.59966-45867.eraiBus?z=56&clientId=59966-45867&wait=1

It took more than a minute to process.处理时间超过一分钟。

Problem Description问题描述

I had this same problem on 7.38.0.我在 7.38.0 上遇到了同样的问题。 The problem, I believe, is that ERRAI seems to keep rolling 45 second requests open between the client and server to ensure communication is open.我认为,问题在于 ERRAI 似乎在客户端和服务器之间保持滚动 45 秒请求打开,以确保通信是开放的。 For me, Nginx had a default socket timeout of 30s which meant that it was returning a 504 gateway timeout for these requests, when in actuality they weren't "stuck".对我来说,Nginx 的默认套接字超时为 30 秒,这意味着它为这些请求返回 504 网关超时,而实际上它们并没有“卡住”。 This would only happen if you didn't do anything within Business Central for 30 seconds, as otherwise the request would close and a new one takes over.仅当您在 Business Central 30 秒内未执行任何操作时才会发生这种情况,否则请求将关闭并由新的请求接管。 I feel like ERRAI should really be able to recover from such a scenario, but anyway.我觉得 ERRAI 应该真的能够从这种情况中恢复过来,但无论如何。

Solution解决方案

For me, I updated the socket timeout of my Nginx server to 60s such that the 45s requests didn't get timed out by Nginx.对我来说,我将 Nginx 服务器的套接字超时更新为 60 秒,这样 45 秒的请求就不会被 Nginx 超时。 I believe this is equiavalent to the proxy_read_timeout config in Nginx.我相信这相当于 Nginx 中的proxy_read_timeout配置。

If you can't touch your Nginx config, it seemed like there may also be a way to turn off the server to client communication as outlined here: https://docs.jboss.org/errai/4.0.0.Beta3/errai/reference/html_single/#sid-59146643_BusLifecycle-TurningServerCommunicationOnandOff .如果您无法触摸 Nginx 配置,似乎还有一种方法可以关闭服务器与客户端的通信,如下所述: https ://docs.jboss.org/errai/4.0.0.Beta3/errai /reference/html_single/#sid-59146643_BusLifecycle-TurningServerCommunicationOnandOff I didn't test this as I didn't need to, but it may be an option.我没有测试这个,因为我不需要,但这可能是一个选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Drools 的业务中心使用 Google 登录进行身份验证和授权 - Authentication and authorization using Google login in Drools' business-central Nginx 反向代理drools 商务中心工作台 - Nginx reverse proxy for drools business central workbench 当 kie-server 访问 business-central 上的 websocket controller 时,Drools/Kie-Server/Busines-Central 7.28.0 得到 403 - Drools/Kie-Server/Busines-Central 7.28.0 Is getting a 403 when kie-server accesses the websocket controller on business-central 适用于 JBoss EAP7 的 Drools Business Central Workbench WAR - Drools Business Central Workbench WAR for JBoss EAP7 无法将项目从远程 git/stash 存储库导入到 Business-Central - Unable to import project from remote git/stash repository to Business-Central 如何在 Drools Business Central 中添加驱动程序以添加数据源 - How to add a driver to add data source in Drools Business Central 如何从 Business Central Drools 获取规则数据 - How to get Rule Data from Business Central Drools 我们可以在 TomcatServer 上安装 Business Central Workbench 7.36 吗? - Can we install Business Central Workbench 7.36 on TomcatServer? Java Drools - REST 调用超时 - 内存不足 - Java Drools - REST Call Timing Out - Out Of Memory 如何从 DMN model(Drools Business Central)调用 static Java 方法 - How do I call static Java method from DMN model (Drools Business Central)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM