简体   繁体   English

JBOSS配置

[英]JBOSS Configurations

Disclaimer: I am more of a programmer and have little knowledge of JBOSS. 免责声明:我是一名程序员,对JBOSS的了解很少。

When we deployed the system, it works properly in the test environment. 当我们部署系统时,它可以在测试环境中正常工作。 However in production, since there are multiple users and a lot of data are being updated/saved, some issues occurred. 但是,在生产中,由于有多个用户并且正在更新/保存大量数据,所以发生了一些问题。 Double updates are being created, some functions are not working unless the server is restartedd. 正在创建双重更新,除非重新启动服务器,否则某些功能将无法使用。 I'm thinking that this may be corrected by modifying whatever session or memory parameter JBOSS has. 我认为可以通过修改JBOSS具有的任何会话或内存参数来纠正此问题。 So we could prevent restarting the server every time an error occurs. 因此,我们可以防止每次发生错误时都重新启动服务器。

Question: What parameter or jboss configuration should we edit to accommodate multiple users and a large number of transactions. 问题:我们应该编辑什么参数或jboss配置,以容纳多个用户和大量事务。

You need to investigate the reason for your application not behaving the way you want to. 您需要调查您的应用程序不符合您想要的方式的原因。 Some Points you can consider : 您可以考虑以下几点:

  1. Log request in Jboss support. Jboss支持中的日志请求。
  2. Try increasing Java heap size. 尝试增加Java堆大小。 (this can be done by editing entry in standalone.conf). (这可以通过编辑standalone.conf中的条目来完成)。
  3. Try enabling gc logs to see , if your garbage is properly collected or not. 尝试启用gc日志以查看是否正确收集了垃圾。
  4. Check for memory leakage in code. 检查代码中的内存泄漏。
  5. try to analyze thread dumps to check whether some of your threads are being blocked or not. 尝试分析线程转储,以检查您的某些线程是否被阻止。
  6. See what if you server CPU and memory Utilization is high or not. 查看服务器CPU和内存利用率是否很高。

Check the Heap size of JVM and set it according to Machine RAM available. 检查JVM的堆大小,然后根据可用的计算机RAM进行设置。

You must have performance testing done before you deploy to production. 部署到生产之前,必须完成性能测试。 You can check the behaviour of your code in performance testing using some monitoring tool or JMX tool. 您可以使用某些监视工具或JMX工具在性能测试中检查代码的行为。

Tune the paramter like Heap size, GC alogrithm, you might want to define fixed size of young generation 调整参数,例如堆大小,GC运算法则,您可能想要定义固定大小的年轻一代

Tune the thread as well. 也调整线程。 https://developer.jboss.org/wiki/ThreadPoolConfiguration?_sscc=t https://developer.jboss.org/wiki/ThreadPoolConfiguration?_sscc=t

I'm not sure what version of JBoss you are using, but if you are wanting to increase the JVM memory you can modify the following line in the run.bat file in your bin folder: 我不确定您使用的是哪个版本的JBoss,但是如果您想增加JVM内存,可以在bin文件夹的run.bat文件中修改以下行:

set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m

Xms = Minimum size and Xmx is Maximum size. Xms =最小大小,Xmx是最大大小。 If you think it is due to lack of resources, you may want to increase it to something like this: 如果您认为这是由于缺乏资源而引起的,则可能需要将其增加到如下所示:

set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1024m

Does everything work normally with only 1 or very few users using the system? 使用该系统,只有1个用户或很少用户能正常工作吗? To me it seems more like a coding issue. 在我看来,这更像是一个编码问题。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM