Hibernate out of memory exception while processing large collection of elements

后端 未结 4 1852
野性不改
野性不改 2020-12-18 05:25

I am trying to process collection of heavy weight elements (images). Size of collection varies between 8000 - 50000 entries. But for some reason after processing 1800-1900 e

4条回答
  •  醉梦人生
    2020-12-18 06:16

    Try using session.clear() which "Completely clear the session. Evict all loaded instances and cancel all pending saves, updates and deletions. Do not close open iterators or instances of ScrollableResults"

提交回复
热议问题