Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 1 of 1

Thread: Spring Boot Scheduled Annotation-GC Overhead Limit Exceeded

  1. #1
    Junior Member
    Join Date
    Apr 2023
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Spring Boot Scheduled Annotation-GC Overhead Limit Exceeded

    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
    Last edited by amitkpandey; April 2nd, 2023 at 07:27 AM. Reason: Missed Few Information

Similar Threads

  1. Tutorials Java and Spring Boot
    By cchelariu in forum Java Code Snippets and Tutorials
    Replies: 0
    Last Post: February 16th, 2023, 04:38 AM
  2. Redis use tls and Certificate Authority NA in Spring boot
    By Rajeshbbel in forum Web Frameworks
    Replies: 0
    Last Post: February 11th, 2023, 01:03 AM
  3. DMN model in spring boot
    By sk_123 in forum Web Frameworks
    Replies: 0
    Last Post: February 20th, 2022, 07:25 PM
  4. Set credentials common variable - Spring Boot
    By hellolijujacob@gmail.com in forum Web Frameworks
    Replies: 0
    Last Post: February 11th, 2022, 12:34 AM
  5. Replies: 0
    Last Post: February 7th, 2022, 08:30 AM

Tags for this Thread