@Test
    void testMaxEnvSizeReached() throws IOException {

        final Path dbDir = Files.createTempDirectory("stroom");
        final PathCreator pathCreator = new SimplePathCreator(() -> dbDir, () -> dbDir);
        final TempDirProvider tempDirProvider = () -> dbDir;
        try (LmdbEnv lmdbEnv = new LmdbEnvFactory(pathCreator,
                new LmdbLibrary(pathCreator, tempDirProvider, LmdbLibraryConfig::new))
                .builder(dbDir)
                .withMapSize(ByteSize.ofKibibytes(30))
                .withMaxDbCount(1)
                .withMaxReaderCount(MAX_READERS)
                .addEnvFlag(EnvFlags.MDB_NOTLS)
                .build()) {

            BasicLmdbDb<String, String> db = new BasicLmdbDb<>(
                    lmdbEnv,
                    BYTE_BUFFER_POOL,
                    new StringSerde(),
                    new StringSerde(),
                    "testMaxEnvSizeReached");

            LOGGER.info("env size: {}", ModelStringUtil.formatIECByteSizeString(lmdbEnv.getSizeOnDisk()));

            // Tiny max env size so put a load of entries to blow the limit
            Assertions.assertThatThrownBy(() ->
                            lmdbEnv.doWithWriteTxn(writeTxn -> {
                                for (int i = 0; i < 1_000; i++) {
                                    db.put(writeTxn,
                                            "this is my key " + i,
                                            "this is my value " + i,
                                            false,
                                            false);
                                }
                            }))
                    .rootCause()
                    .isInstanceOf(MapFullException.class)
                    .message()
                    .containsIgnoringCase("Environment mapsize reached");
        }
    }
Have multiple threads open an lmdb env and write/read from the db.
More of a manual test to check that many envs don't cause problems.
Have tried it with 1000.
stroom-lmdb/src/test/java/stroom/lmdb/TestLmdbEnv.java