SHMEM RAM shortage (/dev/shm)

How do I increase SHMEM/SHM RAM storage?

SHMEM RAM shortage (/dev/shm)
/dev/shm: 66.9MB used, 67.1MB total, FTL uses 66.9MB

Docker PiHole
Debug log below

Moderator edit: explicit debug log removed - we just request the token.

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

update: debug log attached to original post.

We ask for the token only so your log does not become public.

Your debug log shows your Pi-hole to have received over a million of DNS requests within the last (at most) 24 hours:

*** [ DIAGNOSING ]: contents of /var/log/pihole
-rw-r--r-- 1 pihole pihole 136K Nov  5 22:25 /var/log/pihole/FTL.log

   -----tail of FTL.log------
   [2022-11-05 21:33:53.671 1135M] Imported 1101302 queries from the long-term database
   [2022-11-05 21:33:53.673 1135M]  -> Total DNS queries: 1101302
   [2022-11-05 21:33:53.673 1135M]  -> Cached DNS queries: 9717
   [2022-11-05 21:33:53.673 1135M]  -> Forwarded DNS queries: 1088835
   [2022-11-05 21:33:53.673 1135M]  -> Blocked DNS queries: 918
   [2022-11-05 21:33:53.673 1135M]  -> Unknown DNS queries: 0
   [2022-11-05 21:33:53.673 1135M]  -> Unique domains: 1382
   [2022-11-05 21:33:53.673 1135M]  -> Unique clients: 15
   [2022-11-05 21:33:53.673 1135M]  -> Known forward destinations: 4

This is an excessive amount of requests for just 15 client IPs.

You should try to find the origin of those excessive requests.

Run from inside your Pi-hole container, what's the output of:

echo ">stats >quit" | nc localhost 4711
echo ">top-clients >quit" | nc localhost 4711
echo ">top-domains >quit" | nc localhost 4711
echo ">top-ads >quit" | nc localhost 4711

|
Shared memory shortage (/dev/shm) ahead: 99% is used
66.9MB used, 67.1MB total, FTL uses 66.9MB

got same issue on this, i use for large amount of client,

With a lot of clients, this increase is normal.

If you are running Pi-hole in a docker container (like OP), you need to increase the shared memory used by the container.

This is a docker setting. The default value is 64MB.

From Docker Docs:

--shm-size=""
Size of /dev/shm. The format is <number><unit>. number must be greater than 0. Unit is optional and can be b (bytes), k (kilobytes), m (megabytes), or g (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses 64m.

Try 128MB or a higher value:

Use --shm-size=128m in your docker run command, or shm_size: '128m' in a compose file to change the value.

Version:
2025.11.0

just i have to use shm_size: '256m' im my docker compose file.

version: "3"

services:
pihole:
container_name: pihole
image: pihole/pihole:latest
shm_size: '256m'

with 64 does not start :wink:

119.000 Lists

Docker - Pi-hole documentation

errors logged:
2025-11-05 12:02:36.668 CET [65M] WARNING: Shared memory shortage (/dev/shm) ahead: 99% is used (67.0MB used, 67.1MB total, FTL uses 67.0MB)
2025-11-05 12:02:36.677 CET [65M] WARNING: Could not fallocate() in realloc_shm() (/app/src/shmem.c:838): No space left on device
2025-11-05 12:02:36.677 CET [65M] CRIT: realloc_shm(): Failed to resize "/FTL-65-queries" (10) to 64880640: No space left on device (28)
[i] pihole-FTL exited with status 1

[i] Version info:
Core version is v6.2.2 (Latest: v6.2.2)
Web version is v6.3 (Latest: v6.3)
FTL version is v6.3.2 (Latest: v6.3.3)