PiHole goes rate limited followed by RAM shortage (/dev/shm) ahead: 98% used

PiHole run in a docker container in Synology NAS

PiHole is not a DHCP Server (Nighthawk RAX200)
Requests only coming from 10.0.0.1
Options like conditional forwarding does not reveal other client IPs
Increased Rate Limit in Settings to 99000 within 300s leads to message:
RAM shortage (/dev/shm) ahead: 98% used
/dev/shm: 66.3MB used, 67.1MB total, FTL uses 66.3MB

Does it make sense to move the DHCP Server from Router to the PiHole Docker Container to reveal clients and spread the requests to them?

https://tricorder.pi-hole.net/qtKwJ1Wd/

Your rate limit is as follows:

   RATE_LIMIT=29000/10

Your memory may be consumed by the massive number of domains you have in gravity:

gravity_count         14996146

The more entries on blocklist, the higher your memory use.

   [2023-10-18 10:30:06.565 1921M] WARNING: RAM shortage (/dev/shm) ahead: 98% is used (/dev/shm: 66.2MB used, 67.1MB total, FTL uses 66.2MB)
   [2023-10-18 10:30:07.566 1921M] add_message(type=7, message=/dev/shm) - SQL error step DELETE: database is locked

Let's take a look at the most recent 24 hour activity. What are the outputs of the following from the Pi terminal:

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

echo ">querytypes >quit" | nc localhost 4711

echo ">dbstats >quit" | nc localhost 4711

echo ">overTime >quit" | nc localhost 4711

Thanks jfb!

yes I changed my rate limit back to this value after pihole nearly immediatly went the shm issue. Thought way to many requests filling up the pihole-ftl.db... I deleted (or lets say renamed) this .db file to get pihole back working (.db file was already around 900MB in size).

yes I thought there are no limits in domain numbers theoretically, therefore took many lists from https://github.com/RPiList/specials/blob/c2101783fa3cd99ff4ee52c2a2fa397853b9e71c/Blocklisten.md
reduced this now dramatically to about 10% and deactivated conditional forwarding in the options, now it seems pihole is more responsive.

can you tell me where I do have to enter the echo statements in the docker container window?
does not seem to work in the Docker GUI > PiHole Container > Terminal
But I think as I deleted the pihole-ftl.db there is not much information left

If you aren't able to use the Synology GUI to run the commands you need to execute them on the Operating System terminal.

Open a terminal window and execute:

docker exec Pihole /bin/bash -c "echo '>stats >quit' | nc localhost 4711"

Replace Pihole with the name of your container. Repeat the command using the commands requested by jfb. (If you receive a permission error, add sudo)

root@pihole-pihole:/# echo '>stats >quit' | nc localhost 4711                                                                           
domains_being_blocked 1919413                                                                                                           
dns_queries_today 38666                                                                                                                 
ads_blocked_today 3774                                                                                                                  
ads_percentage_today 9.760513                                                                                                           
unique_domains 2153                                                                                                                     
queries_forwarded 17486                                                                                                                 
queries_cached 16695                                                                                                                    
clients_ever_seen 12                                                                                                                    
unique_clients 12                                                                                                                       
dns_queries_all_types 38666                                                                                                             
reply_UNKNOWN 12452                                                                                                                     
reply_NODATA 7298                                                                                                                       
reply_NXDOMAIN 3759                                                                                                                     
reply_CNAME 4207                                                                                                                        
reply_IP 10234                                                                                                                          
reply_DOMAIN 78                                                                                                                         
reply_RRNAME 37                                                                                                                         
reply_SERVFAIL 1                                                                                                                        
reply_REFUSED 59                                                                                                                        
reply_NOTIMP 0                                                                                                                          
reply_OTHER 0                                                                                                                           
reply_DNSSEC 515                                                                                                                        
reply_NONE 0                                                                                                                            
reply_BLOB 26                                                                                                                           
dns_queries_all_replies 38666                                                                                                           
privacy_level 0                                                                                                                         
status enabled                                                                                                                          
root@pihole-pihole:/# echo '>top-clients >quit' | nc localhost 4711                                                                     
0 32438 10.0.0.1                                                                                                                        
1 4964 :: pi.hole                                                                                                                       
2 887 10.0.0.10                                                                                                                         
3 243 127.0.0.1 localhost                                                                                                               
4 143 10.0.0.31                                                                                                                         
5 78 10.0.0.2 pi.hole                                                                                                                   
6 16 10.0.0.14                                                                                                                          
7 1 10.0.0.3 pi.hole                                                                                                                    
8 1 ::1 localhost                                                                                                                       
9 1 fe80::211:32ff:fef7:ad70 pi.hole                                                                                                    
root@pihole-pihole:/# echo '>top-domains >quit' | nc localhost 4711                                                                     
0 5408 api.steampowered.com                                                                                                             
1 2957 shelly-31-eu.shelly.cloud                                                                                                        
2 1689 iot.shelly.cloud                                                                                                                 
3 1370 portal-eu.ecouser.net                                                                                                            
4 1333 www.netgear.com                                                                                                                  
5 821 speedmeter.orange.sk                                                                                                              
6 580 api.insight.synology.com                                                                                                          
7 550 42.0.0.10.in-addr.arpa                                                                                                            
8 407 1.0.0.10.in-addr.arpa                                                                                                             
9 334 cocoapi.bmwgroup.com                                                                                                              
root@pihole-pihole:/# echo '>top-ads >quit' | nc localhost 4711                                                                         
0 219 raw.githubusercontent.com                                                                                                         
1 194 api.steampowered.com                                                                                                              
2 171 eic.service.lgtvcommon.com                                                                                                        
3 146 shelly-31-eu.shelly.cloud                                                                                                         
4 86 _...                                                                           
5 84 unagi-na.amazon.com                                                                                                                
6 77 _...                                                                                             
7 74 _...                                                         
8 61 iot.shelly.cloud                                                                                                                   
9 59 ic3.events.data.microsoft.com                                                                                                      
root@pihole-pihole:/# echo '>top-querytypes >quit' | nc localhost 4711                                                                  
root@pihole-pihole:/# echo '>querytypes >quit' | nc localhost 4711                                                                      
A (IPv4): 50.64                                                                                                                         
AAAA (IPv6): 24.42                                                                                                                      
ANY: 0.00                                                                                                                               
SRV: 3.67                                                                                                                               
SOA: 0.43                                                                                                                               
PTR: 7.06                                                                                                                               
TXT: 0.06                                                                                                                               
NAPTR: 0.00                                                                                                                             
MX: 0.00                                                                                                                                
DS: 10.36                                                                                                                               
RRSIG: 0.00                                                                                                                             
DNSKEY: 2.44                                                                                                                            
NS: 0.11                                                                                                                                
OTHER: 0.00                                                                                                                             
                                                                                                                                        
SVCB: 0.01                                                                                                                              
HTTPS: 0.81                                                                                                                             
root@pihole-pihole:/# echo '>dbstats >quit' | nc localhost 4711                                                                         
queries in database: 38781                                                                                                              
database filesize: 1.84 MB                                                                                                              
SQLite version: 3.42.0                                                                                                                  
root@pihole-pihole:/# echo '>overtime >quit' | nc localhost 4711                                                                        
root@pihole-pihole:/# echo '>overTime >quit' | nc localhost 4711                                                                        
1697573100 0 0                                                                                                                          
1697573700 0 0                                                                                                                          
1697574300 0 0                                                                                                                          
1697574900 0 0                                                                                                                          
1697575500 0 0                                                                                                                          
1697576100 0 0                                                                                                                          
1697576700 0 0                                                                                                                          
1697577300 0 0                                                                                                                          
1697577900 0 0                                                                                                                          
1697578500 0 0                                                                                                                          
1697579100 0 0                                                                                                                          
1697579700 0 0                                                                                                                          
1697580300 0 0                                                                                                                          
1697580900 0 0                                                                                                                          
1697581500 0 0                                                                                                                          
1697582100 0 0                                                                                                                          
1697582700 0 0                                                                                                                          
1697583300 0 0                                                                                                                          
1697583900 0 0                                                                                                                          
1697584500 0 0                                                                                                                          
1697585100 0 0                                                                                                                          
1697585700 0 0                                                                                                                          
1697586300 0 0                                                                                                                          
1697586900 0 0                                                                                                                          
1697587500 0 0                                                                                                                          
1697588100 0 0                                                                                                                          
1697588700 0 0                                                                                                                          
1697589300 0 0                                                                                                                          
1697589900 0 0                                                                                                                          
1697590500 0 0                                                                                                                          
1697591100 0 0                                                                                                                          
1697591700 0 0                                                                                                                          
1697592300 0 0                                                                                                                          
1697592900 0 0                                                                                                                          
1697593500 0 0                                                                                                                          
1697594100 0 0                                                                                                                          
1697594700 0 0                                                                                                                          
1697595300 0 0                                                                                                                          
1697595900 0 0                                                                                                                          
1697596500 0 0                                                                                                                          
1697597100 0 0                                                                                                                          
1697597700 0 0                                                                                                                          
1697598300 0 0                                                                                                                          
1697598900 0 0                                                                                                                          
1697599500 0 0                                                                                                                          
1697600100 0 0                                                                                                                          
1697600700 0 0                                                                                                                          
1697601300 0 0                                                                                                                          
1697601900 0 0                                                                                                                          
1697602500 0 0                                                                                                                          
1697603100 0 0                                                                                                                          
1697603700 0 0                                                                                                                          
1697604300 0 0                                                                                                                          
1697604900 0 0                                                                                                                          
1697605500 0 0                                                                                                                          
1697606100 0 0                                                                                                                          
1697606700 0 0                                                                                                                          
1697607300 0 0                                                                                                                          
1697607900 0 0                                                                                                                          
1697608500 0 0                                                                                                                          
1697609100 0 0                                                                                                                          
1697609700 0 0                                                                                                                          
1697610300 0 0                                                                                                                          
1697610900 0 0                                                                                                                          
1697611500 0 0                                                                                                                          
1697612100 0 0                                                                                                                          
1697612700 0 0                                                                                                                          
1697613300 0 0                                                                                                                          
1697613900 0 0                                                                                                                          
1697614500 0 0                                                                                                                          
1697615100 0 0                                                                                                                          
1697615700 0 0                                                                                                                          
1697616300 0 0                                                                                                                          
1697616900 0 0                                                                                                                          
1697617500 0 0                                                                                                                          
1697618100 0 0                                                                                                                          
1697618700 0 0                                                                                                                          
1697619300 0 0                                                                                                                          
1697619900 0 0                                                                                                                          
1697620500 0 0                                                                                                                          
1697621100 0 0                                                                                                                          
1697621700 0 0                                                                                                                          
1697622300 0 0                                                                                                                          
1697622900 0 0                                                                                                                          
1697623500 0 0                                                                                                                          
1697624100 0 0                                                                                                                          
1697624700 0 0                                                                                                                          
1697625300 0 0                                                                                                                          
1697625900 0 0                                                                                                                          
1697626500 0 0                                                                                                                          
1697627100 0 0                                                                                                                          
1697627700 0 0                                                                                                                          
1697628300 112 0                                                                                                                        
1697628900 1239 15                                                                                                                      
1697629500 2096 1650                                                                                                                    
1697630100 3564 1484                                                                                                                    
1697630700 1713 37                                                                                                                      
1697631300 1020 0                                                                                                                       
1697631900 13 0                                                                                                                         
1697632500 48 2                                                                                                                         
1697633100 3 0                                                                                                                          
1697633700 24 0                                                                                                                         
1697634300 50 0                                                                                                                         
1697634900 32 4                                                                                                                         
1697635500 43 0                                                                                                                         
1697636100 13 0                                                                                                                         
1697636700 23 2                                                                                                                         
1697637300 8 0                                                                                                                          
1697637900 24 0                                                                                                                         
1697638500 21 0                                                                                                                         
1697639100 12 0                                                                                                                         
1697639700 2072 57                                                                                                                      
1697640300 1284 29                                                                                                                      
1697640900 1280 18                                                                                                                      
1697641500 1657 4                                                                                                                       
1697642100 1265 10                                                                                                                      
1697642700 889 2                                                                                                                        
1697643300 871 0                                                                                                                        
1697643900 1025 4                                                                                                                       
1697644500 705 1                                                                                                                        
1697645100 1067 1                                                                                                                       
1697645700 259 0                                                                                                                        
1697646300 0 0                                                                                                                          
1697646900 687 8                                                                                                                        
1697647500 1215 0                                                                                                                       
1697648100 530 10                                                                                                                       
1697648700 916 2                                                                                                                        
1697649300 492 0                                                                                                                        
1697649900 505 3                                                                                                                        
1697650500 532 5                                                                                                                        
1697651100 791 0                                                                                                                        
1697651700 606 6                                                                                                                        
1697652300 891 5                                                                                                                        
1697652900 535 1                                                                                                                        
1697653500 525 5                                                                                                                        
1697654100 555 6                                                                                                                        
1697654700 783 10                                                                                                                       
1697655300 574 4                                                                                                                        
1697655900 857 1                                                                                                                        
1697656500 548 7                                                                                                                        
1697657100 912 76                                                                                                                       
1697657700 673 65                                                                                                                       
1697658300 1147 72                                                                                                                      
1697658900 1232 120                                                                                                                     
1697659500 904 69                                                                                                                       

(some work related links removed)