Apr 17, 2018在一次微服务中遇到过GC长时间停顿,jconsole中显示堆内存一直飙升从不下降的过程,这里进行一下模拟; 开启JMX监控 在springboot中可以很方便添加jmx启动配置: @Configuration class ConfigureRMI { @Value("${jmx.rmi.hostname:localhost}") private String rmiHost; @Value("${jmx.rmi.port:5000}") private Integer rmiPort; @Bean public RmiRegistryFactoryBean rmiRegistry() { final RmiRegistryFactoryBean rmiRegistryFactoryBean = new RmiRegistryFactoryBean(); rmiRegistryFactoryBean.setPort(rmiPort); rmiRegistryFactoryBean.setAlwaysCreate(true); return rmiRegistryFactoryBean;...
Read More