Hi,

The MVStore uses a limited, fixed amount of memory (about 32 MB). If your
application uses a lot of memory, then you will get out of memory.

I suggest to analyze such problems with "jmap -histo" or "jmap -histo:live".

If you still think this is a problem of the MVStore, then please post a
complete, simple, reproducible test case.

Regards,
Thomas



On Friday, March 3, 2017, javaworkinggirl <[email protected]> wrote:

> Trying to use MVStore to write to disk.  But when I run, I am getting an
> out
> of memory error.
>
> Caused by: java.lang.IllegalStateException: Last block not stored,
> possibly
> due to out-of-memory [1.4.193/3]
>         at
> org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765)
> ~[h2-1.4.193.jar:1.4.193]
>         at org.h2.mvstore.MVStore.storeNowTry(MVStore.java:1096)
> ~[h2-1.4.193.jar:1.4.193]
>         at org.h2.mvstore.MVStore.storeNow(MVStore.java:1052)
> ~[h2-1.4.193.jar:1.4.193]
>
> Do I have something configured incorrectly?  Can someone point me in the
> right direction?   Do I need to call commit more often?
>
> Thanks.
>
> Tara
>
> protected MVStore persistentManager = null;
>    private MVMap<String, Set&lt;Integer>> map = null;
>
>  String filename = getDirectory() + File.separator + getName();
>       FileUtils.forceMkdir(new File(getDirectory()));
>
>       getLogger().info("initializing  mvstore ; filename={}", filename);
>       // open the store (in-memory if fileName is null)
>       persistentManager = MVStore.open(filename);
>       getLogger().info("initialized mvstore; filename={}", filename);
>
> map = persistentManager.openMap(getName());
>
>
>
> --
> View this message in context: http://h2-database.66688.n3.
> nabble.com/MVStore-write-to-disk-but-getting-an-out-of-
> memory-error-tp4034019.html
> Sent from the H2 Database mailing list archive at Nabble.com.
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:;>.
> To post to this group, send email to [email protected]
> <javascript:;>.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to