-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Insane battery usage #282
Comments
Hmm, are you sure that gotify is responsible for the battery use, is it shown inside the android battery management? Gotify is by design pretty battery hungry because it has a long-running open connection. On most devices, the battery usage is negligible I don't know if that can be improved for your specific device. |
I'm using gotify/android v2.5.1; gotify/server v2.2.4 running in a podman container. The server logs don't show anything out of the ordinary:
|
I'm not sure if this is related, but the app also uses a lot of memory. I got my last notification 8h ago, but in the last 3h, the app was the one which used the most memory if we exclude system apps. I've 16GB RAM for this reason I've never noticed it, but on low-end devices, it may have a bigger impact. |
@MathieuMoalic Could you check the logs inside gotify/android, check if there are errors over the night, or when you haven't used gotify. Maybe there are frequent reconnects or something similar. If there are frequent reconnects, it should also be visible in the gotify/server logs. @ob-unisa maybe, but android or rather java probably doesn't trigger the garbage collection when you've so much free ram left. But I don't have much experience with memory management in android. |
Here are both logs. The servers logs are in the UTC timezone whereas the android logs are in the CET timezone. It might or might not be relevant but the server is running in rootless podman behind a caddy reverse proxy. Android logs
Server logs
|
The logs look fine, I don't know why gotify requires that much battery on your device, and I also don't know how to debug this. |
arr.. thanks for trying to help me. For the time being I have to switch to another notification service because my phone can't last a whole day if I have gotify running. Hit me up if something changes, I would be happy to give it a second shot. |
I also observe heavy battery consumption from gotify app (it's the main consumer, according to battery usage report). @jmattheis would an optional feature to check gotify server every, say, 5-10 minutes, be less battery-consuming than maintaining a websocket connection? |
It could improve battery usage, but I don't know if something like this should be included into gotify, as only a pretty small group do have these battery problems. |
Only a small group report it, that doesn't mean anybody else doesn't have it! |
Bump, Gotify consumes too much battery on android IMO this issue should be reopened @jmattheis |
You can't really compare apps that use FCM with Gotify. Gotify requires a persistent connection to gotify/server and this consumes much more energy than something like telegram where the app only wakes up when there is a new message. #379 together with the settings mentioned in the ticket could improve battery life. It's also likely that the battery usage report isn't accurate and misreporting gotify to have a higher usage, because it's always running in the background. |
Hello there,
I have setup gotify on my homeserver and it works flawlessly. However, on my android device ( OnePlus 5T with OxygenOS 10.0.1 ), the gotify app will drain my battery in a few hours. For comparison, having the gotify app running while my phone is locked and screen turn off is equivalent in power draw to playing a youtube video in 1080p over 4g with 80% screen brightness. This is with battery optimization off as otherwise Android would kill the connection and render the app useless. Is there anything I can do to fix it ?
The text was updated successfully, but these errors were encountered: