My Rundeck detail
Rundeck version: 3.4.10
install type: war on tomcat 9.0.55
OS Name/version: Windows Server 2016 Standard
DB Type/version: default h2
Expected Behavior
Anytime we click on the UI the cpu spikes to 100% and stays for several seconds. Each click can take between 30 seconds and 4 minutes to clear depending on the web page. The Activity page and the Jobs page are the worst offenders.
How to Reproduce
Click on projects or Jobs with few or no jobs running; or click on the Activity page(s).
We have 5 projects each with 4-5 jobs and at any given time there may be 1 or 2 jobs running but the longest we have only runs for 10 minutes with the average job taking under a minute. We were using RunDeck 3.1.1 before but after the log4j vulnerability fix was made available we have upgraded. Both versions have been slow, but 3.4.1 seems to have been the slowest.
Our server is a VM with:
Windows Server 2016 Standard
Ram: 8Gb
CPU: Quad 2.1 Ghz
Disk: 249 GB (184 GB free)
The health api always says 'healthy':
{"dataSource.connection.time":{"healthy":true,"message":"Datasource connection healthy with timeout 5 seconds"},"quartz.scheduler.threadPool":{"healthy":true}}
I have set our setenv.bat in tomcat to the following:
Additionally I set our profile.bat in rundeck to:
Hi Aaron,
Checking your system info I noticed that the instance is using only 247 MB as Xmx memory.
Could you try using this setenv.bat
(in a non-prod env) and check the system info value?
set CATALINA_OPTS=-XX:MaxPermSize=256m -Xmx2048m -Xms1024m -server -Drdeck.base=C:\your\rundeck\path
More tips to configure:
Regards.
--
You received this message because you are subscribed to a topic in the Google Groups "rundeck-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rundeck-discuss/vj65ADl9Pk4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rundeck-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rundeck-discuss/f3661f47-b647-4c12-b871-4447751683dcn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rundeck-discuss/95577d87-d6d2-4473-8d50-183e9c54e7b0n%40googlegroups.com.
|
|||||||||||||||||||
| |||||||||||||||||||
|
|||||||||||||||||||
|
|
||||||||||||||||||
|
|||||||||||||||||||
|
|||||||||||||||||||
|
|
To view this discussion on the web visit https://groups.google.com/d/msgid/rundeck-discuss/95577d87-d6d2-4473-8d50-183e9c54e7b0n%40googlegroups.com.
Hi Aaron,
I tested Rundeck 3.4.10 on Tomcat 9.0.55 under Amazon Corretto JRE 1.8.0_312 and 11 (on Windows Server 2019 virtual machine) from scratch and it works as expected, let me share with you my config files:
The setenv.bat
file (at tomcat bin
directory) I added the first line just to test your configuration, but it works without that line:
set "JRE_HOME=C:\jre8
set "CATALINA_OPTS=-XX:MaxPermSize=256m -Xmx1024m -Xms512m -server -Drdeck.base=C:\rdeck"
The profile.bat
file (at C:/rdeck/etc
directory), this file keeps untouched.
set RDECK_BASE=C:\rdeck
set JAVA_HOME=C:\jre8
:: Unsetting JRE_HOME to ensure there is no conflict with JAVA_HOME
(set JRE_HOME=)
set Path=%JAVA_HOME%\bin;%RDECK_BASE%\tools\bin;%Path%
set RDECK_SSL_OPTS="-Djavax.net.ssl.trustStore=%RDECK_BASE%\etc\truststore -Djavax.net.ssl.trustStoreType=jks -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol"
set RDECK_CLI_OPTS=-Xms256m -Xmx4096m
set RD_LIBDIR=%RDECK_BASE%\tools\lib
The rundeck-config.properties
file (at C:\rdeck\server\config
directory, my test instance is outside Tomcat base directory):
#loglevel.default is the default log level for jobs: ERROR,WARN,INFO,VERBOSE,DEBUG
loglevel.default=INFO
rdeck.base=C:/rdeck
#rss.enabled if set to true enables RSS feeds that are public (non-authenticated)
rss.enabled=false
server.address=0.0.0.0
server.port=8080
grails.serverURL=http://localhost:8080/rdeck
server.servlet.context-path=/rdeck
dataSource.dbCreate = none
dataSource.url = jdbc:h2:file:C:/rdeck/server/data/grailsdb;DB_CLOSE_ON_EXIT=FALSE
grails.plugin.databasemigration.updateOnStart=true
# Pre Auth mode settings
rundeck.security.authorization.preauthenticated.enabled=false
rundeck.security.authorization.preauthenticated.attributeName=REMOTE_USER_GROUPS
rundeck.security.authorization.preauthenticated.delimiter=,
# Header from which to obtain user name
rundeck.security.authorization.preauthenticated.userNameHeader=X-Forwarded-Uuid
# Header from which to obtain list of roles
rundeck.security.authorization.preauthenticated.userRolesHeader=X-Forwarded-Roles
# Redirect to upstream logout url
rundeck.security.authorization.preauthenticated.redirectLogout=false
rundeck.security.authorization.preauthenticated.redirectUrl=/oauth2/sign_in
rundeck.feature.repository.enabled=true
The framework.properties
file (at C:\rdeck\etc
path)
# framework.properties -
#
# ----------------------------------------------------------------
# Server connection information
# ----------------------------------------------------------------
framework.server.name = localhost
framework.server.hostname = localhost
framework.server.port = 8080
framework.server.url = http://localhost:8080/rdeck
# ----------------------------------------------------------------
# Installation locations
# ----------------------------------------------------------------
rdeck.base=C:/rdeck
framework.projects.dir=C:/rdeck/projects
framework.etc.dir=C:/rdeck/etc
framework.var.dir=C:/rdeck/var
framework.tmp.dir=C:/rdeck/var/tmp
framework.logs.dir=C:/rdeck/var/logs
framework.libext.dir=C:/rdeck/libext
# ----------------------------------------------------------------
# SSH defaults for node executor and file copier
# ----------------------------------------------------------------
framework.ssh.keypath = C:/Users/Administrator/.ssh/id_rsa
framework.ssh.user = Administrator
# ssh connection timeout after a specified number of milliseconds.
# "0" value means wait forever.
framework.ssh.timeout = 0
# ----------------------------------------------------------------
# Auto generated server UUID: 9ca61cca-d4af-4c76-bd2c-60b01fec427f
# ----------------------------------------------------------------
rundeck.server.uuid = 9ca61cca-d4af-4c76-bd2c-60b01fec427f
# ----------------------------------------------------------------
# System-wide global variables.
# ----------------------------------------------------------------
# Expands to ${globals.var1}
#framework.globals.var1 = value1
# Expands to ${globals.var2}
#framework.globals.var2 = value2
In this research I found that the Allocated Memory always reach the 100% on Java 8 (Corretto and AdoptJDK/OpenJDK), switching to Java 11 (Corretto and AdopJDK/OpenJDK) this value keeps around 50%, so, I think Java 11 is more efficient to manage Rundeck memory allocation under Tomcat.
So, as a recommendation, switch to Java 11, configure your instances against a “real” database and make sure that you’re editing the right files, the Tomcat+Rundeck config don’t need extra stuff (at least basically), all is defined on the setenv.bat
file (also take a look on the file permissions).
Regards!