How do I configure the heartbeat timeout in AM (All versions)?
The purpose of this article is to provide information on configuring the heartbeat timeout in AM. This allows you to tune the heartbeat timeout if you experience issues with heartbeat timeouts.
3 readers recommend this article
Heartbeat timeout is the time spent on AM sending and receiving the heartbeat request and is not pure processing time on DS.
The default heartbeat timeout is 10 seconds in AM 7.2 and later, and 3 seconds in pre-AM 7.2. This timeout is configurable, which is useful if you are experiencing heartbeat timeouts. You will see errors such as the following in your logs if you are experiencing heartbeat timeouts:
- Session debug log (when debug level is set to Message): Caused by: org.forgerock.opendj.ldap.ConnectionException: Server Connection Closed: Heartbeat timed out after 500 ms
- IdRepo debug log (when debug level is set to Message): org.forgerock.opendj.ldap.ConnectionException: Server Connection Closed: Heartbeat timed out after 500 ms
- Web application container log (for example, catalina.out for Apache Tomcat™): WARNING: No heartbeat detected for connection 'LDAPConnection(/188.8.131.52:8443,am.example.com/184.108.40.206:443)'
If you do see errors such as the above, you should increase the heartbeat timeout; in pre-AM 7.2, it is recommended that you initially increase it to 10 seconds and then slowly increase it further if you continue to see errors.
Configuring the heartbeat timeout
You can configure the heartbeat timeout using either the AM admin UI or ssoadm:
- AM admin UI: navigate to: Deployment > Servers > [Server Name] > Advanced and add the org.forgerock.openam.ldap.heartbeat.timeout property and enter the heartbeat timeout in seconds for the value. To add the property as a server default, navigate to: Configure > Server Defaults > Advanced instead. Once you have entered the property and value, click + to add followed by Save Changes.
ssoadm: enter the following command: $ ./ssoadm update-server-cfg -s [servername] -u [adminID] -f [passwordfile] -a org.forgerock.openam.ldap.heartbeat.timeout=[seconds]replacing [servername], [adminID], [passwordfile] and [seconds] with appropriate values, where [servername] can be default if you want to change the default server settings instead. For example:
- AM 7 and later: $ ./ssoadm update-server-cfg -s default -u uid=amAdmin,ou=People,dc=am,dc=forgerock,dc=org -f pwd.txt -a org.forgerock.openam.ldap.heartbeat.timeout=10
- AM 6.x: $ ./ssoadm update-server-cfg -s default -u amadmin -f pwd.txt -a org.forgerock.openam.ldap.heartbeat.timeout=10
You must restart the web application container in which AM runs to apply these configuration changes.
How do I perform a heartbeat check against DS (All versions)?
Related Issue Tracker IDs