File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,21 @@ This API fully supports use in multi-threaded applications. In such
6969applications, we suggest creating one ` Reader ` object and sharing that among
7070threads.
7171
72+ ## Common Problems ##
73+
74+ ### File Lock on Windows ###
75+
76+ By default, this API uses the ` MEMORY_MAP ` mode, which memory maps the file.
77+ On Windows, this may create an exclusive lock on the file that prevents it
78+ from being renamed or deleted. Due to the implementation of memory mapping in
79+ Java, this lock will not be released when the ` DatabaseReader ` is closed; it
80+ will only be released when the object and the ` MappedByteBuffer ` it uses are
81+ garbage collected. Older JVM versions may also not release the lock on exit.
82+
83+ To work around this problem, use the ` MEMORY ` mode or try upgrading your JVM
84+ version. You may also call ` System.gc() ` after dereferencing the
85+ ` DatabaseReader ` object to encourage the JVM to garbage collect sooner.
86+
7287## Format ##
7388
7489The MaxMind DB format is an open format for quickly mapping IP addresses to
You can’t perform that action at this time.
0 commit comments