Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run Pi Hole after upgrade to version 6: Database Corruption during migration #1705

Open
1 of 6 tasks
opticsthewebsite opened this issue Feb 19, 2025 · 7 comments
Open
1 of 6 tasks

Comments

@opticsthewebsite
Copy link

opticsthewebsite commented Feb 19, 2025

This is a: Run Issue

Details

After latest upgrade, Pi Hole fails to start after an apparent failure to migrate the FTL database.

  Upgrading gravity database from version 17 to 18
  Upgrading gravity database from version 18 to 19
  [i] pihole-FTL pre-start checks
  [i] Setting capabilities on pihole-FTL where possible
  [i] Applying the following caps to pihole-FTL:
        * CAP_CHOWN
        * CAP_NET_BIND_SERVICE
        * CAP_NET_RAW
  [i] Starting pihole-FTL (no-daemon) as root
fatal: unable to access 'https://github.com/pi-hole/pi-hole/': Could not resolve host: github.com
  [i] Version info:
      Core version is v6.0 (Latest: N/A)
      Web version is v6.0 (Latest: N/A)
      FTL version is v6.0 (Latest: v6.0)
2025-02-18 22:25:49.062 MST [68M] INFO: ########## FTL started on Synology1522! ##########
2025-02-18 22:25:49.062 MST [68M] INFO: FTL branch: master
2025-02-18 22:25:49.062 MST [68M] INFO: FTL version: v6.0
2025-02-18 22:25:49.062 MST [68M] INFO: FTL commit: eaa7dbb4
2025-02-18 22:25:49.062 MST [68M] INFO: FTL date: 2025-02-18 17:19:26 +0000
2025-02-18 22:25:49.062 MST [68M] INFO: FTL user: root
2025-02-18 22:25:49.062 MST [68M] INFO: Compiled for linux/amd64 (compiled on CI) using cc (Alpine 14.2.0) 14.2.0
2025-02-18 22:25:49.063 MST [68M] INFO: 1 FTLCONF environment variable found (0 used, 0 invalid, 1 ignored)
2025-02-18 22:25:49.064 MST [68M] WARNING: [?] FTLCONF_LOCAL_IPV4 is unknown, did you mean any of these?
2025-02-18 22:25:49.064 MST [68M] WARNING:     - FTLCONF_debug_all
2025-02-18 22:25:49.065 MST [68M] INFO: Wrote config file:
2025-02-18 22:25:49.065 MST [68M] INFO:  - 152 total entries
2025-02-18 22:25:49.065 MST [68M] INFO:  - 143 entries are default
2025-02-18 22:25:49.065 MST [68M] INFO:  - 9 entries are modified
2025-02-18 22:25:49.065 MST [68M] INFO:  - 0 entries are forced through environment
2025-02-18 22:25:49.066 MST [68M] INFO: Parsed config file /etc/pihole/pihole.toml successfully
2025-02-18 22:25:49.066 MST [68M] INFO: PID file does not exist or not readable
2025-02-18 22:25:49.066 MST [68M] INFO: No other running FTL process found.
2025-02-18 22:25:49.066 MST [68M] WARNING: Insufficient permissions to set process priority to -10 (CAP_SYS_NICE required), process priority remains at 0
2025-02-18 22:25:49.067 MST [68M] WARNING: Starting pihole-FTL as user root is not recommended
2025-02-18 22:25:49.067 MST [68M] INFO: PID of FTL process: 68
2025-02-18 22:25:49.068 MST [68M] INFO: listening on 0.0.0.0 port 53
2025-02-18 22:25:49.068 MST [68M] INFO: listening on :: port 53
2025-02-18 22:25:49.068 MST [68M] INFO: PID of FTL process: 68
2025-02-18 22:25:49.104 MST [68M] INFO: Database version is 12
2025-02-18 22:25:49.104 MST [68M] INFO: Updating long-term database to version 13
2025-02-18 22:25:49.555 MST [68M] INFO: Updating long-term database to version 14
2025-02-18 22:25:58.098 MST [68M] INFO: Updating long-term database to version 15
2025-02-18 22:26:00.295 MST [68M] INFO: Updating long-term database to version 16
2025-02-18 22:26:06.250 MST [68M] INFO: Updating long-term database to version 17
2025-02-18 22:26:10.735 MST [68M] INFO: Updating long-term database to version 18
2025-02-18 22:26:25.181 MST [68M] INFO: Updating long-term database to version 19
2025-02-18 22:26:26.323 MST [68M] INFO: Updating long-term database to version 20
2025-02-18 22:26:31.812 MST [68M] INFO: Updating long-term database to version 21
2025-02-18 22:26:32.935 MST [68M] INFO: Database successfully initialized
2025-02-18 22:26:35.130 MST [68M] ERROR: SQLite3: database corruption at line 73163 of [873d4e274b] (11)
2025-02-18 22:26:35.130 MST [68M] ERROR: SQLite3: statement aborts at 7: [INSERT INTO query_storage SELECT * FROM disk.query_storage WHERE timestamp >= ?] database disk image is malformed (11)
2025-02-18 22:26:35.130 MST [68M] ERROR: import_queries_from_disk(): Failed to import queries: database disk image is malformed
2025-02-18 22:26:35.131 MST [68M] ERROR: SQLite3: statement aborts at 55: [INSERT INTO domain_by_id SELECT * FROM disk.domain_by_id] database disk image is malformed (11)
2025-02-18 22:26:35.131 MST [68M] ERROR: import_queries_from_disk(INSERT INTO domain_by_id SELECT * FROM disk.domain_by_id): Cannot import linking table: database disk image is malformed
2025-02-18 22:26:35.131 MST [68M] ERROR: SQLite3: statement aborts at 57: [INSERT INTO client_by_id SELECT * FROM disk.client_by_id] database disk image is malformed (11)
2025-02-18 22:26:35.131 MST [68M] ERROR: import_queries_from_disk(INSERT INTO client_by_id SELECT * FROM disk.client_by_id): Cannot import linking table: database disk image is malformed
2025-02-18 22:26:35.131 MST [68M] ERROR: SQLite3: statement aborts at 55: [INSERT INTO forward_by_id SELECT * FROM disk.forward_by_id] database disk image is malformed (11)
2025-02-18 22:26:35.131 MST [68M] ERROR: import_queries_from_disk(INSERT INTO forward_by_id SELECT * FROM disk.forward_by_id): Cannot import linking table: database disk image is malformed
2025-02-18 22:26:35.131 MST [68M] ERROR: SQLite3: statement aborts at 58: [INSERT INTO addinfo_by_id SELECT * FROM disk.addinfo_by_id] database disk image is malformed (11)
2025-02-18 22:26:35.131 MST [68M] ERROR: import_queries_from_disk(INSERT INTO addinfo_by_id SELECT * FROM disk.addinfo_by_id): Cannot import linking table: database disk image is malformed
2025-02-18 22:26:35.131 MST [68M] ERROR: SQLite3: statement aborts at 30: [INSERT OR REPLACE INTO sqlite_sequence SELECT * FROM disk.sqlite_sequence] database disk image is malformed (11)
2025-02-18 22:26:35.131 MST [68M] ERROR: import_queries_from_disk(INSERT OR REPLACE INTO sqlite_sequence SELECT * FROM disk.sqlite_sequence): Cannot import linking table: database disk image is malformed
2025-02-18 22:26:35.131 MST [68M] ERROR: import_queries_from_disk(): Cannot end transaction: database disk image is malformed
2025-02-18 22:26:35.131 MST [68M] INFO: Parsing queries in database
2025-02-18 22:26:35.131 MST [68M] INFO: Imported 0 queries from the long-term database
2025-02-18 22:26:35.131 MST [68M] INFO:  -> Total DNS queries: 0
2025-02-18 22:26:35.131 MST [68M] INFO:  -> Cached DNS queries: 0
2025-02-18 22:26:35.131 MST [68M] INFO:  -> Forwarded DNS queries: 0
2025-02-18 22:26:35.131 MST [68M] INFO:  -> Blocked DNS queries: 0
2025-02-18 22:26:35.131 MST [68M] INFO:  -> Unknown DNS queries: 0
2025-02-18 22:26:35.131 MST [68M] INFO:  -> Unique domains: 0
2025-02-18 22:26:35.131 MST [68M] INFO:  -> Unique clients: 0
2025-02-18 22:26:35.131 MST [68M] INFO:  -> DNS cache records: 0
2025-02-18 22:26:35.131 MST [68M] INFO:  -> Known forward destinations: 0
2025-02-18 22:26:37.997 MST [68M] ERROR: SQLite3: database corruption at line 73163 of [873d4e274b] (11)
2025-02-18 22:26:37.997 MST [68M] ERROR: SQLite3: statement aborts at 3: [SELECT MAX(id) FROM disk.query_storage] database disk image is malformed (11)
2025-02-18 22:26:37.997 MST [68M] ERROR: init_disk_db_idx(): Failed to get MAX(id) from disk.query_storage: database disk image is malformed
2025-02-18 22:26:37.997 MST [68M] WARNING: Insufficient permissions to set system time (CAP_SYS_TIME required), NTP client not available
2025-02-18 22:26:37.997 MST [68/T144] INFO: NTP server listening on 0.0.0.0:123 (IPv4)
2025-02-18 22:26:37.997 MST [68M] INFO: FTL is running as root
2025-02-18 22:26:37.997 MST [68/T145] INFO: NTP server listening on :::123 (IPv6)
2025-02-18 22:26:38.076 MST [68M] INFO: Created SSL/TLS certificate for pi.hole at /etc/pihole/tls.pem
2025-02-18 22:26:38.076 MST [68M] INFO: Reading certificate from /etc/pihole/tls.pem ...
2025-02-18 22:26:38.076 MST [68M] INFO: Using SSL/TLS certificate file /etc/pihole/tls.pem
2025-02-18 22:26:38.076 MST [68M] INFO: Web server ports:
2025-02-18 22:26:38.076 MST [68M] INFO:   - 8443 (HTTPS, IPv4, optional)
2025-02-18 22:26:38.076 MST [68M] INFO:   - 84 (HTTP, IPv6)
2025-02-18 22:26:38.076 MST [68M] INFO: Restored 0 API sessions from the database
2025-02-18 22:26:38.424 MST [68M] INFO: Blocking status is enabled
2025-02-18 22:26:38.512 MST [68M] WARNING: Connection error (2606:4700:4700::1111#53): failed to send UDP request (Network unreachable)
2025-02-18 22:26:38.584 MST [68/T146] ERROR: SQLite3: database corruption at line 88896 of [873d4e274b] (11)
2025-02-18 22:26:38.584 MST [68/T146] ERROR: SQLite3: statement aborts at 25: [SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));] database disk image is malformed (11)
2025-02-18 22:26:38.584 MST [68/T146] ERROR: getMACfromIP("192.168.88.1"): Failed step: database disk image is malformed
2025-02-18 22:26:38.584 MST [68/T146] WARNING: Database /etc/pihole/pihole-FTL.db is damaged and cannot be used.
2025-02-18 22:26:38.584 MST [68/T146] INFO: Compiled 1 allow and 0 deny regex for 1 client in 24.2 msec
2025-02-18 22:36:39.422 MST [68M] WARNING: Connection error (2606:4700:4700::1111#53): failed to send UDP request (Network unreachable)

Related Issues

  • I have searched this repository/Pi-hole forums for existing issues and pull requests that look similar

How to reproduce the issue

  1. Environment data
  • Operating System: Synology DSM 7.2.2
  • Hardware: Synology Diskstation
  • Kernel Architecture: AMD64
  • Docker Install Info and version:
    • Software source: Official Docker
    • Supplimentary Software: Portainer
  • Hardware architecture: x86
version: "3"
services:
  pihole:
    environment:
      - WEB_PORT=8888
      - WEBPASSWORD=XXXX
      - FTLCONF_LOCAL_IPV4=192.168.88.246
      - TZ=America/Phoenix
      - DNSMASQ_USER=root
      - DNSMASQ_LISTENING=all
      - WEB_BIND_ADDR=192.168.88.246
      #- INTERFACE=eth0
    volumes:
      - /volume1/docker/pihole/dnsmasq.d:/etc/dnsmasq.d
      - /volume1/docker/pihole/pihole:/etc/pihole
    network_mode: host
    restart: unless-stopped
    image: pihole/pihole:latest
networks: {}
  1. any additional info to help reproduce

These common fixes didn't work for my issue

  • I have tried removing/destroying my container, and re-creating a new container
  • I have tried fresh volume data by backing up and moving/removing the old volume data
  • I have tried running the stock docker run example(s) in the readme (removing any customizations I added)
  • I have tried a newer or older version of Docker Pi-hole (depending what version the issue started in for me)
  • I have tried running without my volume data mounts to eliminate volumes as the cause

If the above debugging / fixes revealed any new information note it here.
Add any other debugging steps you've taken or theories on root cause that may help.

@yubiuser
Copy link
Member

 2025-02-18 22:26:38.584 MST [68/T146] ERROR: SQLite3: database corruption at line 88896 of [873d4e274b] (11)
2025-02-18 22:26:38.584 MST [68/T146] ERROR: SQLite3: statement aborts at 25: [SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));] database disk image is malformed (11)

This indicates some kind of hardware (HDD/SDD) failure. You can try to move the old database to a backup location and restart the container

@niawag
Copy link

niawag commented Feb 19, 2025

Hi, I faced the same problem on two different devices so I don't think it can be a hardware issue. But I tried to remove the pihole-FTL.db file and that got both my pihole up

@cameronoliver
Copy link

Hi,
Ran into this exact same issue.

Used portainer to start a console session and renamed /etc/pihole/pihole-FTL.db to pihole-FTL.db.backup, then restarted the container.
Pihole came back up and is working now, so I removed the .backup file.

Also note that some of the Env variables have changed and will need to be updated in your compose file.
List available here:
https://docs.pi-hole.net/docker/upgrading/v5-v6/

@opticsthewebsite
Copy link
Author

Hi, Ran into this exact same issue.

Used portainer to start a console session and renamed /etc/pihole/pihole-FTL.db to pihole-FTL.db.backup, then restarted the container. Pihole came back up and is working now, so I removed the .backup file.

Also note that some of the Env variables have changed and will need to be updated in your compose file. List available here: https://docs.pi-hole.net/docker/upgrading/v5-v6/

I did the same as you, restarted the container and it came back online without any issues.

THANK YOU for letting me know my Env variables were out of date. Updated them per the linked article and everything is good.

@CelsoSantos
Copy link

I was also facing issues with the upgrade (replaced the required env variables and otherwise just pulled the new image) and I can confirm that after renaming my pihole-FTL.db file to something else it started working normally..

Here's an excerpt of the logs with the relevant erroring section:

pihole  | 2025-02-19 22:29:31.039 WET [55M] INFO: Database successfully initialized
pihole  | tail: /var/log/pihole/FTL.log: file truncated
pihole  |
pihole  | 2025-02-19 22:34:25.306 WET [55M] INFO: Imported 1069932 queries from the on-disk database (it has 229925755 rows)
pihole  | 2025-02-19 22:34:25.307 WET [55M] INFO: Parsing queries in database
pihole  | 2025-02-19 22:34:25.401 WET [55M] INFO:   10000 queries parsed...
pihole  | 2025-02-19 22:34:25.471 WET [55M] INFO:   20000 queries parsed...
pihole  | 2025-02-19 22:34:25.542 WET [55M] INFO:   30000 queries parsed...
pihole  | 2025-02-19 22:34:25.614 WET [55M] INFO:   40000 queries parsed...
pihole  | 2025-02-19 22:34:25.685 WET [55M] INFO:   50000 queries parsed...
pihole  | 2025-02-19 22:34:25.756 WET [55M] INFO:   60000 queries parsed...
pihole  | 2025-02-19 22:34:25.828 WET [55M] INFO:   70000 queries parsed...
pihole  | 2025-02-19 22:34:25.899 WET [55M] INFO:   80000 queries parsed...
pihole  | 2025-02-19 22:34:25.970 WET [55M] INFO:   90000 queries parsed...
pihole  | 2025-02-19 22:34:26.044 WET [55M] INFO:   100000 queries parsed...
pihole  | 2025-02-19 22:34:26.115 WET [55M] INFO:   110000 queries parsed...
pihole  | 2025-02-19 22:34:26.188 WET [55M] INFO:   120000 queries parsed...
pihole  | 2025-02-19 22:34:26.260 WET [55M] INFO:   130000 queries parsed...
pihole  | 2025-02-19 22:34:26.333 WET [55M] INFO:   140000 queries parsed...
pihole  | 2025-02-19 22:34:26.405 WET [55M] INFO:   150000 queries parsed...
pihole  | 2025-02-19 22:34:26.478 WET [55M] INFO:   160000 queries parsed...
pihole  | 2025-02-19 22:34:26.550 WET [55M] INFO:   170000 queries parsed...
pihole  | 2025-02-19 22:34:26.622 WET [55M] INFO:   180000 queries parsed...
pihole  | 2025-02-19 22:34:26.696 WET [55M] INFO:   190000 queries parsed...
pihole  | 2025-02-19 22:34:26.769 WET [55M] INFO:   200000 queries parsed...
pihole  | 2025-02-19 22:34:26.844 WET [55M] INFO:   210000 queries parsed...
pihole  | 2025-02-19 22:34:26.917 WET [55M] INFO:   220000 queries parsed...
pihole  | 2025-02-19 22:34:26.991 WET [55M] INFO:   230000 queries parsed...
pihole  | 2025-02-19 22:34:27.064 WET [55M] INFO:   240000 queries parsed...
pihole  | 2025-02-19 22:34:27.142 WET [55M] INFO:   250000 queries parsed...
pihole  | 2025-02-19 22:34:27.216 WET [55M] INFO:   260000 queries parsed...
pihole  | 2025-02-19 22:34:27.289 WET [55M] INFO:   270000 queries parsed...
pihole  | 2025-02-19 22:34:27.364 WET [55M] INFO:   280000 queries parsed...
pihole  | 2025-02-19 22:34:27.478 WET [55M] INFO:   290000 queries parsed...
pihole  | 2025-02-19 22:34:27.554 WET [55M] INFO:   300000 queries parsed...
pihole  | 2025-02-19 22:34:27.627 WET [55M] INFO:   310000 queries parsed...
pihole  | 2025-02-19 22:34:27.704 WET [55M] INFO:   320000 queries parsed...
pihole  | 2025-02-19 22:34:27.778 WET [55M] INFO:   330000 queries parsed...
pihole  | 2025-02-19 22:34:27.855 WET [55M] INFO:   340000 queries parsed...
pihole  | 2025-02-19 22:34:27.930 WET [55M] INFO:   350000 queries parsed...
pihole  | 2025-02-19 22:34:28.005 WET [55M] INFO:   360000 queries parsed...
pihole  | 2025-02-19 22:34:28.082 WET [55M] INFO:   370000 queries parsed...
pihole  | 2025-02-19 22:34:28.156 WET [55M] INFO:   380000 queries parsed...
pihole  | 2025-02-19 22:34:28.235 WET [55M] INFO:   390000 queries parsed...
pihole  | 2025-02-19 22:34:28.309 WET [55M] INFO:   400000 queries parsed...
pihole  | 2025-02-19 22:34:28.388 WET [55M] INFO:   410000 queries parsed...
pihole  | 2025-02-19 22:34:28.463 WET [55M] INFO:   420000 queries parsed...
pihole  | 2025-02-19 22:34:28.539 WET [55M] INFO:   430000 queries parsed...
pihole  | 2025-02-19 22:34:28.617 WET [55M] INFO:   440000 queries parsed...
pihole  | 2025-02-19 22:34:28.692 WET [55M] INFO:   450000 queries parsed...
pihole  | 2025-02-19 22:34:28.771 WET [55M] INFO:   460000 queries parsed...
pihole  | 2025-02-19 22:34:28.847 WET [55M] INFO:   470000 queries parsed...
pihole  | 2025-02-19 22:34:28.926 WET [55M] INFO:   480000 queries parsed...
pihole  | 2025-02-19 22:34:29.004 WET [55M] INFO:   490000 queries parsed...
pihole  | 2025-02-19 22:34:29.085 WET [55M] INFO:   500000 queries parsed...
pihole  | 2025-02-19 22:34:29.161 WET [55M] INFO:   510000 queries parsed...
pihole  | 2025-02-19 22:34:29.239 WET [55M] INFO:   520000 queries parsed...
pihole  | 2025-02-19 22:34:29.319 WET [55M] INFO:   530000 queries parsed...
pihole  | 2025-02-19 22:34:29.396 WET [55M] INFO:   540000 queries parsed...
pihole  | 2025-02-19 22:34:29.478 WET [55M] INFO:   550000 queries parsed...
pihole  | 2025-02-19 22:34:29.555 WET [55M] INFO:   560000 queries parsed...
pihole  | 2025-02-19 22:34:29.636 WET [55M] INFO:   570000 queries parsed...
pihole  | 2025-02-19 22:34:29.719 WET [55M] INFO:   580000 queries parsed...
pihole  | 2025-02-19 22:34:29.805 WET [55M] INFO:   590000 queries parsed...
pihole  | 2025-02-19 22:34:29.885 WET [55M] INFO:   600000 queries parsed...
pihole  | 2025-02-19 22:34:29.962 WET [55M] INFO:   610000 queries parsed...
pihole  | 2025-02-19 22:34:30.045 WET [55M] INFO:   620000 queries parsed...
pihole  | 2025-02-19 22:34:30.123 WET [55M] INFO:   630000 queries parsed...
pihole  | 2025-02-19 22:34:30.205 WET [55M] INFO:   640000 queries parsed...
pihole  | 2025-02-19 22:34:30.283 WET [55M] INFO:   650000 queries parsed...
pihole  | 2025-02-19 22:34:30.366 WET [55M] INFO:   660000 queries parsed...
pihole  | 2025-02-19 22:34:30.445 WET [55M] INFO:   670000 queries parsed...
pihole  | 2025-02-19 22:34:30.528 WET [55M] INFO:   680000 queries parsed...
pihole  | 2025-02-19 22:34:30.607 WET [55M] INFO:   690000 queries parsed...
pihole  | 2025-02-19 22:34:30.685 WET [55M] INFO:   700000 queries parsed...
pihole  | 2025-02-19 22:34:30.769 WET [55M] INFO:   710000 queries parsed...
pihole  | 2025-02-19 22:34:30.848 WET [55M] INFO:   720000 queries parsed...
pihole  | 2025-02-19 22:34:30.932 WET [55M] INFO:   730000 queries parsed...
pihole  | 2025-02-19 22:34:31.011 WET [55M] INFO:   740000 queries parsed...
pihole  | 2025-02-19 22:34:31.097 WET [55M] INFO:   750000 queries parsed...
pihole  | 2025-02-19 22:34:31.177 WET [55M] INFO:   760000 queries parsed...
pihole  | 2025-02-19 22:34:31.257 WET [55M] INFO:   770000 queries parsed...
pihole  | 2025-02-19 22:34:31.342 WET [55M] INFO:   780000 queries parsed...
pihole  | 2025-02-19 22:34:31.421 WET [55M] INFO:   790000 queries parsed...
pihole  | 2025-02-19 22:34:31.507 WET [55M] INFO:   800000 queries parsed...
pihole  | 2025-02-19 22:34:31.586 WET [55M] INFO:   810000 queries parsed...
pihole  | 2025-02-19 22:34:31.672 WET [55M] INFO:   820000 queries parsed...
pihole  | 2025-02-19 22:34:31.695 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 91% is used (61.2MB used, 67.1MB total, FTL uses 61.2MB)
pihole  | 2025-02-19 22:34:33.142 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 91% is used (61.5MB used, 67.1MB total, FTL uses 61.5MB)
pihole  | 2025-02-19 22:34:33.167 WET [55M] INFO:   830000 queries parsed...
pihole  | 2025-02-19 22:34:33.178 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 92% is used (61.8MB used, 67.1MB total, FTL uses 61.8MB)
pihole  | 2025-02-19 22:34:33.214 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 92% is used (62.1MB used, 67.1MB total, FTL uses 62.0MB)
pihole  | 2025-02-19 22:34:33.250 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 92% is used (62.4MB used, 67.1MB total, FTL uses 62.3MB)
pihole  | 2025-02-19 22:34:33.260 WET [55M] INFO:   840000 queries parsed...
pihole  | 2025-02-19 22:34:33.286 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 93% is used (62.6MB used, 67.1MB total, FTL uses 62.6MB)
pihole  | 2025-02-19 22:34:33.322 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 93% is used (62.9MB used, 67.1MB total, FTL uses 62.9MB)
pihole  | 2025-02-19 22:34:33.344 WET [55M] INFO:   850000 queries parsed...
pihole  | 2025-02-19 22:34:33.357 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 94% is used (63.2MB used, 67.1MB total, FTL uses 63.2MB)
pihole  | 2025-02-19 22:34:33.393 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 94% is used (63.5MB used, 67.1MB total, FTL uses 63.5MB)
pihole  | 2025-02-19 22:34:33.428 WET [55M] INFO:   860000 queries parsed...
pihole  | 2025-02-19 22:34:33.429 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 95% is used (63.8MB used, 67.1MB total, FTL uses 63.8MB)
pihole  | 2025-02-19 22:34:33.465 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 95% is used (64.1MB used, 67.1MB total, FTL uses 64.1MB)
pihole  | 2025-02-19 22:34:33.500 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 95% is used (64.4MB used, 67.1MB total, FTL uses 64.4MB)
pihole  | 2025-02-19 22:34:33.520 WET [55M] INFO:   870000 queries parsed...
pihole  | 2025-02-19 22:34:33.537 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 96% is used (64.7MB used, 67.1MB total, FTL uses 64.7MB)
pihole  | 2025-02-19 22:34:33.573 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 96% is used (65.0MB used, 67.1MB total, FTL uses 65.0MB)
pihole  | 2025-02-19 22:34:33.605 WET [55M] INFO:   880000 queries parsed...
pihole  | 2025-02-19 22:34:33.609 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 97% is used (65.3MB used, 67.1MB total, FTL uses 65.3MB)
pihole  | 2025-02-19 22:34:33.645 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 97% is used (65.6MB used, 67.1MB total, FTL uses 65.6MB)
pihole  | 2025-02-19 22:34:33.681 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 98% is used (65.9MB used, 67.1MB total, FTL uses 65.9MB)
pihole  | 2025-02-19 22:34:33.697 WET [55M] INFO:   890000 queries parsed...
pihole  | 2025-02-19 22:34:33.718 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 98% is used (66.2MB used, 67.1MB total, FTL uses 66.2MB)
pihole  | 2025-02-19 22:34:33.753 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 99% is used (66.5MB used, 67.1MB total, FTL uses 66.5MB)
pihole  | 2025-02-19 22:34:33.782 WET [55M] INFO:   900000 queries parsed...
pihole  | 2025-02-19 22:34:33.790 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 99% is used (66.8MB used, 67.1MB total, FTL uses 66.8MB)
pihole  | 2025-02-19 22:34:33.826 WET [55M] WARNING: Shared memory shortage (/dev/shm) ahead: 99% is used (67.1MB used, 67.1MB total, FTL uses 67.1MB)
pihole  | 2025-02-19 22:34:33.841 WET [55M] WARNING: Could not fallocate() in realloc_shm() (/app/src/shmem.c:838): No space left on device
pihole  | 2025-02-19 22:34:33.841 WET [55M] CRIT: realloc_shm(): Failed to resize "/FTL-55-queries" (10) to 65470464: No space left on device (28)
pihole  |
pihole  |   [i] pihole-FTL exited with status 1

I understand the issue is that it seems to be running out of space on /dev/shm but I think that's within the container, because the OS has 2GB for that partition

$ df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/root       118G   70G   44G  62% /
devtmpfs        1.7G     0  1.7G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           759M  2.0M  757M   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
/dev/sda1       253M   32M  221M  13% /boot
tmpfs           380M   28K  380M   1% /run/user/1000

@yubiuser
Copy link
Member

@CelsoSantos

You have a different issue than the OP. As you said, your container seems to have to little space (~67 MB) to parse all your queries into memory. Can you increase the amount of RAM your container has access to?

@CelsoSantos
Copy link

CelsoSantos commented Feb 20, 2025

@CelsoSantos

You have a different issue than the OP. As you said, your container seems to have to little space (~67 MB) to parse all your queries into memory. Can you increase the amount of RAM your container has access to?

Yes. I hadn't had the time to look at this properly until this morning and I was coming with an update:

In case you end up on this thread, it's possible to increase the size of the /dev/shm by using the shm_size setting, which takes a value in bytes.

Example: To increase the partition size to 128MB one can set on the docker-compose.yaml the following:

services:
  pihole:
    (...)
    shm_size: 134217728

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants