Recently we receive reports regarding Blokada consuming too much battery and we would like to assist you to narrow it down a bit.
It worth to know the DoH implementation may consumes some additional energy, thus, first turn off DNS encryption: Settings - This device - Use DNS over HTTPS: set it to “No”. Please note the DNS requests won’t be encrypted after you do it. Check if the battery consumption lowers.
If not, open Blokada’s log. Go to the main screen, tap the 3 dots in the top right corner, choose “Logs”. Search for the below messages (in very big numbers): PLForwarde Forwarder reached 1024 open sockets
It indicates Blokada received a very huge number of DNS requests and the number of open sockets reached the max limit. In such case, Blokada tries to kill this sockets and restart. This is the procedure that consumes the battery, and this is why you see Blokada uses a lot of energy. In such case it is recommended to check the Activity tab in Blokada to see which hosts are being accessed, it can help to identify which app or apps are generating too much traffic.
Additionally you can use a battery analyser app that will show which apps are running. If your device isn’t rooted, you may try AccuBattery. BetterBatteryStats can be used on non-rooted and rooted devices too, however, in the first case you need to grant additional permissions:
adb -d shell pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS
adb -d shell pm grant com.asksven.betterbatterystats android.permission.DUMP
In case you don’t yet have adb, refer to this guide.
Unfortunately Blokada’s log won’t show which application/s, process/es or service/s querying the DNS server, hence it won’t ship the information to determine what causes the bottleneck.
I think the battery drain problem would be fixed if you bring the “smart list” feature from blokada4. I know its in beta but it works perfectly in my opinon (samsung s9)
Yes, I did… I do see that same error message but the top hosts are unfortunately very generic analytics endpoints – though one of them is related to Audible, it looks like, the rest are just things like google analytics and flurry.
I’ve had gsam battery monitor with proper ADB accessf or a long time, and nothing much sticks out as helpful besides Blokada consuming lots of battery. It didn’t use to w/v4
Haven’t noticed anything unusal, here (S9+); battery usage is at 8.9%, next up is One UI Home at 2.9%, but before that are file and web browsers at over 20 and 30% usage, respectively (I have battery optimization disabled for Blokada and others, btw - no DoH either).
My log is full of this sometimes:
PLForwarde Forwarder reached 1024 open sockets
But there are no unusual activities.
I’m using BetterBatteryStats and only Blokada 5 sticks out there. When I deactivate Blokada 5, everything is normal. I didn’t have this issue with Blokada 4.
Blokada 5 will stick out due to the nature of the ad filtering.
When you start Blokada, it generates a VPN tunnel to filter ads (don’t mix it with Blokada+, the real VPN service). Every non-bypassed app will communicate through this tunnel, it means the more apps you have (and not bypassed), the more requests Blokada must process. If you have a lot of requests, Blokada will be very active, and this is why you see that is “drains” battery.
To avoid overloading and crashes, Blokada 5 has a limit (that is the forwarder that is reached 1024 open sockets). When this limit is reached, Blokada will kill the sockets.
The problem here is that we do not know what/which processes (apps) are generating the tons of requests (just as I wrote above, in the initial description).
In BBS, you must check the 2nd, 3rd, etc apps, what they are, what they do.
Also worth to check on the Analysis screen in Blokada which hosts are the most accessed, you might get a hunch.
Okay thanks. I can’t see any abnormalities in BBS and on the activities screen. I have now bypassed all apps except the ones that I want to explicitly block. I am curious how it will behave.
I bypassed every installed and system app. And I still get this log message:
Edit: I found out that I can reproduce this behavior when I am using the Eufy Security App, even when it is bypassed (and also every other app is bypassed) and even when I only get a push notification from it.
“Unfortunately Blokada’s log won’t show which application/s, process/es or service/s querying the DNS server, hence it won’t ship the information to determine what causes the bottleneck.”
It would be really helpful if Blokada would log what app or process is making the requests. I’ve been having this issue for a while and can’t figure out what is making the requests.
If I turn Blokada off and back on my phone will run for a couple of days before I start getting that “Forwarder reached 1024 open sockets” message in the logs again.
Due to Android’s app isolation, currently it seems to be impossible without rooting the device. One app can’t see what an other app does, only if the app has root privileges.
Any insight into why toggling Blokada off and on causes the problem to resolve for a few days? As far as I’ve been able to determine, there’s nothing on my phone rapidly making a ton of network requests. And if there were, I’d kind of expect the behavior to return rapidly after toggling Blokada.
I’m having the same issues with my Samsung S10, huge battery drain and warning from the system that Blokada is using a lot of battery power. If I can identify the app or apps causing this drain with Blokada, what would I do next?
I turned off the battery optimization on my Galaxy S10 for the Blokada app and thought that fixed the issue (which it did for a few days), but again I get the high CPU usage warning system message and huge battery drain. I’m going to uninstall v5 and go back to v4.