diff --git a/iocore/hostdb/MultiCache.cc b/iocore/hostdb/MultiCache.cc index 536338d14bf..ddb59da46b0 100644 --- a/iocore/hostdb/MultiCache.cc +++ b/iocore/hostdb/MultiCache.cc @@ -203,7 +203,7 @@ MultiCacheBase::initialize(Store *astore, char *afilename, int aelements, int ab astore->free(*store); delete store; store = NULL; - Warning("Configured store too small, unable to reconfigure"); + Warning("Configured store too small (actual=%d required=%d), unable to reconfigure", got * STORE_BLOCK_SIZE, blocks * STORE_BLOCK_SIZE); return -3; } totalsize = (STORE_BLOCK_SIZE)*blocks; diff --git a/iocore/hostdb/P_HostDBProcessor.h b/iocore/hostdb/P_HostDBProcessor.h index 22b095dd289..d4f3ba0a38d 100644 --- a/iocore/hostdb/P_HostDBProcessor.h +++ b/iocore/hostdb/P_HostDBProcessor.h @@ -217,10 +217,11 @@ struct HostDBCache : public MultiCache { // This accounts for an average of 2 HostDBInfo per DNS cache (for round-robin etc.) // In addition, we can do a padding for additional SRV records storage. + // In addition, we add 120 for hostname storage (since we now always do that) virtual size_t estimated_heap_bytes_per_entry() const { - return sizeof(HostDBInfo) * 2 + 512 * hostdb_srv_enabled; + return sizeof(HostDBInfo) * 2 + 512 * hostdb_srv_enabled + 120; } // Map to contain all of the host file overrides, initialize it to empty diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index 8efca86e073..d448afe8a33 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -1048,7 +1048,7 @@ static const RecordElement RecordsConfig[] = , {RECT_CONFIG, "proxy.config.hostdb.storage_path", RECD_STRING, TS_BUILD_CACHEDIR, RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL} , - {RECT_CONFIG, "proxy.config.hostdb.storage_size", RECD_INT, "33554432", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL} + {RECT_CONFIG, "proxy.config.hostdb.storage_size", RECD_INT, "45375488", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL} , // # in minutes (all three) // # 0 = obey, 1 = ignore, 2 = min(X,ttl), 3 = max(X,ttl)