Jhipster消耗大量资源

时间:2015-02-10 07:44:36

标签: mysql performance vps netstat jhipster

我已经在VPS(OVH)上部署了一个Jhipster应用程序,并在其上安装了tomcat7。 几天后,应用程序似乎非常缓慢。 一旦我启动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)的许多连接有关

1 个答案:

答案 0 :(得分:1)

有一个连接池,因此您可以打开多个连接而不会导致任何特定问题。

您可以在"监控"中检查连接池的状态。屏幕,当然你可以运行JConsole来获得更详细的信息(我们使用的是HikariCP,它通过JMX导出大量数据)