java - OutOfMemoryError:GC Overhead limit exceeded -


in 1 of our java application have got outofmemoryerror:gc overhead limit exceeded.

we have used hashmaps in someplaces storing data.from logs can identify reproducing @ same place.

i wanted ask if garbage collector spends more time in clearing hashmaps?

upon looking @ code( cant share here ), have found that there hashmap created

hashmap topo = new hashmap();

but hashmap never used. kind of memory leak in application ?

if hashmap created inside method doing processing , not used elsewhere method accessed multiple threads 20 .then in such case impact,creating hashmap above, garbage collector spend more time in recovering heap , throw oome.

please let me know if need more details.

n 1 of our java application have got outofmemoryerror:gc overhead limit exceeded. have used hashmaps in someplaces storing data.from logs can identify reproducing @ same place.

if hashmap ever building , marked static, means keep adding things hashmap , never delete. 1 fine day lead outofmemoryerror.

i wanted ask if garbage collector spends more time in clearing hashmaps?

garbage collector spends time on objects not referenced, weakly referenced, soft referenced. wherever find such objects, depending on need clear them.

upon looking @ code( cant share here ), have found that there hashmap created hashmap topo = new hashmap(); , hashmap never used. kind of memory leak in application ?

if hashmap created inside method doing processing , not used elsewhere method accessed multiple threads 20 . in such case impact,creating hashmap above, garbage collector spend more time in recovering heap , throw oome.

if hashmap local methid, , method exits after doing processing, should garbage collected method exits. hashmap local method, each thread have separate copy of map , once thread finishes method execution, map eligible gc.


Comments