Hi Team,
Good Day,
I am just joined the forum.
I have an issue in my Spring boot application . I am getting OutOfMemory GC Overhead Limit Exceeded. My spring boot application runs as service through Jar.
It has 20 @scheduled annotations which runs 20 task in parallel. I am using mysql and Hikari datasource pool. When i took the heapdump and saw the thread which causing the memory issue , that was simple select statement which read one value from the database. I am not doing any bulk operation where i am loading thousands of records and processing them no. Then why it is coming i am not clear. Below is the thread.
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:100) at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:158) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:116) Local Variable: com.zaxxer.hikari.HikariDataSource#1 at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376) Local Variable: org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback#3 at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:465) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:475) at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:508) at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:515) at com.lms.integration.serviceImpl.TransactionDataServiceImpl.getBusinessDate(TransactionDataServiceImpl.
I am not able to understand how on simple select statement OutofMemory can occur. The last line of thread is my code which runs to get the businessdate.
is it because of i am using so much @scheduled annotations ? I have set the heapsize 2048 M. Please let me know what wrong i am doing. Any help much appreciated.
Thanks