Help: Keycloak in production mode

My test server setup:
I installed Keycloak 11.0.0 on Centos 7 machine. I followed the server administration guide, configured users, clients, mappings. I started the keycloak in standalone mode.
My Spring application sitting from different machine is able to get the tokens. Everything looks good so far.
the keycloak server is being shutdown by the OS server (inactivity time?).
How do I run the keycloak in standalone production mode?
Here is the error I see from keycloak logs:
*[] (Thread-1) WFLYSRV0272: Suspending server *
INFO [] (Thread-1) WFLYEJB0493: EJB subsystem suspension complete
INFO [] (Thread-1) WFLYSRV0220: Server shutdown has been requested via an OS signal

this can happen on centos if you use too much COU or memory, is your instance monitored ?

the instance that the keycloak is installed on, just has keycloak and a tomcat running.
ps aux does not have too many processes running. i am now trying to use systemd to run this as a service.
I will update here, how it goes.

1 Like

I am also facing this problem now.
First, I install Keycloak 11.0.0 and Tomcat 9.0.37. They both working.
After my project deploys on tomcat, Keycloak becomes like this when I check status on the server.

I want to know whether it could be my project error or port error or some config need to change on Keycloak. Do you get the solution? Thanks.

No more logs in the journal ? (journalctl -u keycloak -n 500 ?)

Thank you @sebastienm. I found the solution. It’s due to my server’s insufficient CPU and Memory. That’s why when the tomcat is running Keycloak is down and when Keycloak is running tomcat is down.

Cool ! how much did you have ?

I tested it with digital ocean lowest price package 1vCPU and 1GB memory. Now, I upgrade it to 2vCPU and 2GB memory. It’s ok now. Thanks.