@Test
    void testManyEnvs() throws IOException, InterruptedException {
        final List<Path> dbDirs = new ArrayList<>();
        final List<LmdbEnv> envs = new ArrayList<>();
        final int cnt = 10;
        final CountDownLatch startLatch = new CountDownLatch(cnt);
        final CountDownLatch closeTxnLatch = new CountDownLatch(cnt);
        final CountDownLatch completionLatch = new CountDownLatch(cnt);
        for (int i = 0; i < cnt; i++) {

            final Path dbDir = Files.createTempDirectory("stroom");
            dbDirs.add(dbDir);

            final PathCreator pathCreator = new SimplePathCreator(() -> dbDir, () -> dbDir);
            final TempDirProvider tempDirProvider = () -> dbDir;

            final LmdbEnv lmdbEnv = new LmdbEnvFactory(
                    pathCreator,
                    new LmdbLibrary(pathCreator, tempDirProvider, LmdbLibraryConfig::new))
                    .builder(dbDir)
                    .withMapSize(ByteSize.ofKibibytes(200))
                    .withMaxDbCount(1)
                    .setIsReaderBlockedByWriter(true)
                    .addEnvFlag(EnvFlags.MDB_NOTLS)
                    .build();
            envs.add(lmdbEnv);

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

            CompletableFuture.runAsync(() -> {
                lmdbEnv.doWithWriteTxn(writeTxn -> {

                    LOGGER.debug("putting to env: {}", lmdbEnv.getLocalDir().toAbsolutePath());
                    db.put(writeTxn, "hello", "world", false);
                });

                lmdbEnv.doWithReadTxn(readTxn -> {
                    startLatch.countDown();
                    try {
                        LOGGER.debug("countDownLatch1: {}", startLatch.getCount());
                        startLatch.await();
                    } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                    }

                    final Optional<String> optVal = db.get("hello");
                    Assertions.assertThat(optVal)
                            .hasValue("world");

                    closeTxnLatch.countDown();
                    try {
                        // Wait for all others to reach this point before closing the txn so we have
                        // cnt txns open
                        closeTxnLatch.await();
                    } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                    }

                    completionLatch.countDown();
                });
            }, executor);
        }

        LOGGER.debug("countDownLatch2: {}", completionLatch.getCount());
        completionLatch.await();

        for (int i = 0; i < cnt; i++) {
            LOGGER.debug("Closing {}", envs.get(i).getLocalDir().toAbsolutePath());
            envs.get(i).close();
            FileUtil.deleteDir(dbDirs.get(i));
        }
    }
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