![apache tomcat 8 mysql apache tomcat 8 mysql](https://imag.malavida.com/mvimgbig/download-fs/xampp-6688-1.jpg)
export CATALINA_OPTS="$CATALINA_OPTS -Xms512m" One of the issues that is clearly visible: : GC overhead limit exceededĭenotes that you have not enough heap memory and JVM spends a lot of time doing garbage collect. : Unable to acquire JDBC ConnectionĬaused by: : Unable to acquire JDBC Connection I removed the Xms512m and Xmx512m params and decrease the maximumPoolSize to 20 and after a few hours of the server running ok I got: ERROR .spi.SqlExceptionHelper - HikariPool-1 - Connection is not available, request timed out after 30004ms. What it's the best tomcat + mysql + hiraki configuration to this server? The server is running in a DigitalOcean droplet with 1Gb Ram and 1 vCPU. MySQL my.cnf settings: wait_timeout = 360 I'm using Hikari Connection Pool as bellow: When I verify the memory in use, shows: mysqld = 165.3 MiB I have set at setenv.sh: export CATALINA_OPTS="$CATALINA_OPTS -Xms512m"Įxport CATALINA_OPTS="$CATALINA_OPTS -Xmx512m"Įxport CATALINA_OPTS="$CATALINA_OPTS -server"
Apache tomcat 8 mysql how to#
(YES, THERE'S A LOT OF ERROS, THIS IS WHY IT'S HARD TO ME TO FIGURE OUT HOW TO FIX IT!) In the logs I have: 16:53:02,438 .PoolBase isConnectionAlive - HikariPool-1 - Failed to validate connection 17:04:32,200 .HikariPool run - HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=1m22s40ms97µs73ns).Īnd (90x): 17:04:35,438 .PoolBase isConnectionAlive - HikariPool-1 - Failed to validate connection (No operations allowed after connection closed.)Īlso: : GC overhead limit exceededĪlso later on I got: : Java heap space but only 760Mb was being used by the system. The system keeps frizing and I need to restart Tomcat and MySQL to work again. It's a kinda simple Java Jsf application and only three users use the system simultaneously (There's two kind of big tables, with 20k lines - usually is there when it freezes). I have a Java (tomcat) application that uses with MySQL (with hibernate) as database.