1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-03-06 19:26:13 +00:00

Use temp_store = FILE to avoid memory exhaustion on build the tree for very large databases

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2025-02-23 08:50:08 +01:00
parent a7e414aca4
commit 5da5d0d4c1
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

View File

@ -92,7 +92,8 @@ gravity_build_tree() {
echo -ne " ${INFO} ${str}..."
# The index is intentionally not UNIQUE as poor quality adlists may contain domains more than once
output=$({ pihole-FTL sqlite3 -ni "${gravityTEMPfile}" "CREATE INDEX idx_gravity ON gravity (domain, adlist_id);"; } 2>&1)
# We use temp_store = FILE to avoid memory exhaustion on large databases
output=$({ pihole-FTL sqlite3 -ni "${gravityTEMPfile}" "PRAGMA temp_store = FILE; CREATE INDEX idx_gravity ON gravity (domain, adlist_id);"; } 2>&1)
status="$?"
if [[ "${status}" -ne 0 ]]; then