Whenever -blocksonly is specified, there is implicitly a zero size mempool. However, there is still a non-zero value for -maxmempool which will be shared with dbcache, leading to 300 MB extra usage. Fix this.
if (node.connman) node.connman->Stop();
    StopTorControl();
    
    
    if (node.scheduler) node.scheduler->stop();
    if (node.chainman && node.chainman->m_load_block.joinable()) node.chainman->m_load_block.join();
    StopScriptCheckWorkerThreads();
    
    
    node.peerman.reset();
    node.connman.reset();
    node.banman.reset();
    node.addrman.reset();
    node.netgroupman.reset();
    if (node.mempool && node.mempool->GetLoadTried() && ShouldPersistMempool(*node.args)) {
        DumpMempool(*node.mempool, MempoolPath(*node.args));
    }
    
    if (node.fee_estimator) node.fee_estimator->Flush();
    
    if (node.chainman) {
        LOCK(cs_main);
        for (Chainstate* chainstate : node.chainman->GetAll()) {
            if (chainstate->CanFlushToDisk()) {
                chainstate->ForceFlushStateToDisk();
            }
        }
    }