Hello ,
We are encountering frequent Java heap space issues approximately every 1 1/2 hours after restarting the service. By the end of the day, our H2 database accumulates between 50 to 60 lakh (5 to 6 million) rows. However, the database starts becoming unresponsive when it reaches only 15 to 20 lakh (1.5 to 2 million) rows.
Service Functionality Overview: Our service fetches data from a third-party API and stores it in the H2 database throughout the day. This process is repeated frequently. Ideally, our setup should handle this workload seamlessly. However, after fetching data around 4 to 5 times (approximately 15 lakh records), we start encountering Java heap space errors. Even simple operations like querying the count(*) become impossible.
We have tried increasing the server's CPU cores and memory allocation, but the issue persists.
Request for Assistance: We suspect there might be a memory leak issue with H2 database causing these problems. Could you please advise on:
Any guidance or support you could provide would be greatly appreciated. Thank you for your attention to this matter.
Best regards,
Mahima