我已经在安装了tomcat7的VPS(OVH)上部署了Jhipster应用程序。
几天来,申请似乎很慢。
一旦我启动tomcat,我就做一个netstat-tanpu,得到以下连接:
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 28624/mysqld
tcp 0 0 xx.xx.xx.xxx:53 0.0.0.0:* LISTEN 630/named
tcp 0 0 127.0.0.2:53 0.0.0.0:* LISTEN 630/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 630/named
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 518/sshd
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 630/named
tcp 0 0 127.0.0.1:3306 127.0.0.1:42242 ESTABLISHED 28624/mysqld
tcp 0 0 xx.xx.xx.xxx:42991 xxx.xxx.xxx.xx:443 TIME_WAIT -
tcp 0 0 127.0.0.1:3306 127.0.0.1:42214 ESTABLISHED 28624/mysqld
tcp 0 0 127.0.0.1:3306 127.0.0.1:42230 ESTABLISHED 28624/mysqld
tcp 0 0 xx.xx.xx.xxx:40691 xxx.xxx.xxx.xx:443 TIME_WAIT -
tcp 0 0 127.0.0.1:3306 127.0.0.1:42231 ESTABLISHED 28624/mysqld
tcp 0 0 127.0.0.1:3306 127.0.0.1:42227 ESTABLISHED 28624/mysqld
tcp 0 0 xx.xx.xx.xxx:43299 xxx.xxx.xxx.xx:7070 ESTABLISHED 16013/ipv6
tcp 0 0 127.0.0.1:3306 127.0.0.1:42226 ESTABLISHED 28624/mysqld
tcp 0 0 127.0.0.1:3306 127.0.0.1:42232 ESTABLISHED 28624/mysqld
tcp 0 0 xx.xx.xx.xxx:22 xxx.xxx.xxx.xx:52459 ESTABLISHED 25718/sshd: root@no
tcp 0 36 xx.xx.xx.xxx:22 xxx.xxx.xxx.xx:22036 ESTABLISHED 25941/0
tcp 0 0 127.0.0.1:3306 127.0.0.1:42234 ESTABLISHED 28624/mysqld
tcp 0 0 127.0.0.1:3306 127.0.0.1:42238 ESTABLISHED 28624/mysqld
tcp 0 0 127.0.0.1:3306 127.0.0.1:42228 ESTABLISHED 28624/mysqld
tcp6 0 0 :::8080 :::* LISTEN 26207/java
tcp6 0 0 :::53 :::* LISTEN 630/named
tcp6 0 0 :::22 :::* LISTEN 518/sshd
tcp6 0 0 ::1:953 :::* LISTEN 630/named
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 26207/java
tcp6 0 0 127.0.0.1:42214 127.0.0.1:3306 ESTABLISHED 26207/java
tcp6 0 0 127.0.0.1:42231 127.0.0.1:3306 ESTABLISHED 26207/java
tcp6 0 0 127.0.0.1:42238 127.0.0.1:3306 ESTABLISHED 26207/java
tcp6 0 0 127.0.0.1:42232 127.0.0.1:3306 ESTABLISHED 26207/java
tcp6 0 0 127.0.0.1:42228 127.0.0.1:3306 ESTABLISHED 26207/java
tcp6 0 0 127.0.0.1:42227 127.0.0.1:3306 ESTABLISHED 26207/java
tcp6 0 0 127.0.0.1:42234 127.0.0.1:3306 ESTABLISHED 26207/java
tcp6 0 0 127.0.0.1:42230 127.0.0.1:3306 ESTABLISHED 26207/java
tcp6 0 0 127.0.0.1:42242 127.0.0.1:3306 ESTABLISHED 26207/java
tcp6 0 0 127.0.0.1:42226 127.0.0.1:3306 ESTABLISHED 26207/java
udp 0 0 xx.xx.xx.xxx:53 0.0.0.0:* 630/named
udp 0 0 127.0.0.2:53 0.0.0.0:* 630/named
udp 0 0 127.0.0.1:53 0.0.0.0:* 630/named
udp6 0 0 :::53 :::* 630/named
我想知道我的问题是否与127.0.0.1:3306和xx.xx.xxx.xxx:8080(java和mysqld)的许多连接有关
最佳答案
有一个连接池,因此可以打开多个连接,而不会导致任何特定问题。
您可以在“监视”屏幕中检查连接池的状态,当然,您也可以运行JConsole来获得更详细的信息(我们使用的是HikariCP,它通过JMX导出很多数据)
关于mysql - Jhipster消耗大量资源,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28426489/