java - Spring Batch , HSQLDB growing over the time -
i using spring batch monitor rabbit mq
. trying stress stress running batch every second. running smoothly far used perm generation space
keep on growing. when batch started 30 mb
after 30 hours
of running @ 300 mb
. biggest object occupying memory
org.hsqldb.persist.rowstoreavlmemory 28619232 org.hsqldb.database 96661000
this 2 object hold 32% of total memory.
can please suggest how configure hsqldb
not hold information more 5 mins old don't have requirement of job restarted.
you using hsqldb default all-in-memory tables. data held in memory. type of table allows fast operation , ideal use-cases data not grow beyond limit.
you can add task delete old rows periodically. can trigger declared on table grows, deletes old rows according timestamp after new row inserted.
alternatively, can use cached tables, hold data on disk. can add ;hsqldb.default_table_type=cached
end of jdbc connection url. in case url must indicate file-based database, not in-memory one.
so hsqldb can act same way external database if want to.
Comments
Post a Comment