Why Does Android Disable a VPN App After Several Hours in the Background?
A VPN that was fine in the morning can be off by the afternoon. Learn why Android sometimes stops background apps, how to tell it from a network drop, and what to adjust.
11 min readUpdated Nov 8, 2026By XPASS Editorial Team

You turn the VPN on after breakfast, put the phone in your pocket, and carry on with your day. By mid-afternoon the key icon in the status bar is gone, or the app says it is disconnected, and you did not touch anything. It feels as if Android switched your VPN off on purpose after a certain number of hours. That is a very common complaint, and it is usually not a fixed timer at all.
This article explains what is more likely going on: the way Android manages apps that run in the background, the extra battery tools that some phone makers add, and the network events that can end a connection without any warning. It also gives you a simple way to find out which cause applies to your phone and what you can adjust. Exact menu names differ between phone models and Android versions, so the steps here describe ideas, not one fixed set of screens.
What the symptom usually looks like
People describe this problem in a few slightly different ways, and the wording matters because each points to a different cause.
- The key or VPN icon vanishes from the status bar while the phone is locked, and the app shows "disconnected" when you open it.
- The icon is still there, but nothing loads until you open the VPN app, and then it reconnects by itself.
- The VPN is gone only after the phone has been idle overnight, or after several hours in a bag with the screen off.
- The VPN works for the first hour or two and then the connection becomes unreliable, with pages that stall and then load.
- The app itself is closed when you return to it, as if it had been restarted.
If you can note which of these you see, the rest of the article becomes much easier to follow. A vanished icon with an app that has restarted points towards the app being stopped. An icon that remains but a connection that stalls points more towards the network side. For the broader picture of why Android VPN connections end, see the article on why an Android VPN keeps disconnecting.

How Android treats background apps
Android is built to run on a battery. To make a charge last, it limits what apps may do when you are not using them. The details change from version to version, but the general ideas are stable enough to describe.
First, apps that you have not opened for a while may be placed in a lower priority group. Apps in that group are allowed to run less often, to use the network less often and to schedule fewer tasks. A VPN app is a special case, because it holds a system VPN connection open and is therefore treated as something the phone should keep alive. Even so, the parts of the app that do the housekeeping, such as sending keep-alive messages, checking the network or renewing a session, may still be affected by the limits.
Second, when memory gets short, Android can close background processes to free it. The system tries to avoid closing something that is actively providing a service you rely on, but it is allowed to, and it will do so on a phone with little free memory. When the VPN process is closed, the tunnel goes with it.
Third, there are modes that are tied to what the phone is doing. When the phone sits still, with the screen off and not charging, for a long time, Android may enter a deeper idle state in which network access and background work are batched and delayed. This is one reason the problem often shows up after hours rather than minutes: the deeper limits only apply once the phone has been idle for a while.
None of this is aimed at VPNs in particular. It applies to messaging apps, music apps and many others, which is why you may also have noticed late notifications from other apps on the same phone. If you see that, it supports the idea that the phone's power management is the common factor.
Why the problem takes hours to appear
The "several hours" part is the most telling detail, and it tells you the cause is probably a time-based rule rather than a fault with the connection. A few mechanisms make sense of it.
Gradually stricter standby rules
Some power-saving systems get stricter the longer an app stays unused. In the first minutes nothing changes. After a longer period the app is allowed fewer wake-ups, and after a still longer period the limits become tighter. A VPN that you started and left alone may move through these stages while you are not looking.
Deep idle overnight or during travel
If the phone is lying still for a long time with the screen off, it may enter the deeper idle state mentioned above. Network activity is then grouped into short windows. A VPN tunnel normally relies on small messages being sent on a regular rhythm; if those messages are delayed for long enough, the server or a network device in between may treat the connection as dead and close it.
Network timeouts on the other side
Home routers, mobile networks and some public Wi-Fi systems remove idle connection records after a time. If the phone is quiet, the record for your tunnel may expire. When you wake the phone and send traffic, the tunnel no longer exists on the far side and the app has to start a new one. The result looks like a drop after a period of inactivity.
Moving between networks
Several hours is also enough time to walk out of Wi-Fi range, arrive at work, or switch to mobile data. The VPN has to move to the new network. Sometimes it does so smoothly and sometimes it does not, especially if the app was being limited at that moment.
Because these effects overlap, it is more useful to test than to guess. The test section below shows how.
Manufacturer battery tools and per-app settings
Android includes a standard battery optimisation system, and many phone makers add their own on top. The extra tools can have names such as "app sleeping", "protected apps", "auto-start management" or "deep sleep", and they are often stricter than the standard system. A tool may close apps it considers unused, stop them from starting by themselves after a restart, or remove them from the list of apps that may run in the background.
You do not need to know the exact name of the tool on your phone. What you want to find is the screen where each app has a battery or background setting. In most phones this is under the app's own information page in Settings, in a section about battery or power use, and also in a general battery section with a list of apps. The options are usually something like these:
| Option (wording varies) | What it generally means | Effect on a VPN |
|---|---|---|
| Unrestricted / not optimised | The app may run in the background without extra limits | Usually the most stable choice for an app that must stay connected |
| Optimised / smart | The system decides based on how you use the app | Fine for many people, but the tunnel may be affected after long idle periods |
| Restricted | Background activity is heavily limited | Likely to stop a VPN while the screen is off |
| Put to sleep / deep sleep list | The app is closed after being unused for a time | A common reason for a VPN that disappears after hours |
Changing the setting only for the VPN app keeps the effect on your battery small, because only one app is exempted. If your phone has a separate list of protected or always-allowed apps, adding the VPN app there is the same idea. The article on VPN and battery use on Android goes into more detail about how large the battery cost actually is.
A simple way to find the cause
Instead of changing five settings at once, run a short test. It takes a day or two and gives you a clear answer.
- Connect the VPN and note the time. Use the same routine each day: the same Wi-Fi or mobile data, the same place for the phone, the same screen-off period.
- Leave the phone idle for the length of time in which the problem normally appears. Do not open the VPN app during that period.
- When you come back, look at the status bar first, then at the app, and write down what you see: icon present or not, app state, whether pages load.
- Open the VPN app and reconnect if needed. Check whether the app looks as if it was restarted.
- Repeat the test with only one change, such as setting the VPN app to unrestricted battery use.
- Compare the results. If the problem disappears after the battery change, the cause was power management. If it stays, test on mobile data only and then on Wi-Fi only to see whether a network is involved.
Keep the test fair: charging the phone, turning battery saver on or moving between networks during the test makes the result harder to read. If the phone is also set to battery saver, note that in the test, because it adds its own limits.
Settings that often help
Once you know the likely cause, these changes are the usual first steps. Make them one at a time.
Battery setting for the VPN app
Set the app to the least restricted option your phone offers and watch for a day. This is the single most effective change for many people. On some phones the option is named differently or sits in a manufacturer menu, so look for anything about background use, auto-start or sleeping apps.
Keep the app up to date
App updates sometimes change how the app keeps its connection alive. Install updates from the official store listing, where the app appears as "VPNClient" by SpiderSilk Limited, and check after the update whether the behaviour changes. Android system updates can also change power rules, so a problem that starts after an update is worth noting.
Check the system VPN permission
Android asks you to approve a VPN connection the first time an app creates one. If the permission was removed or another VPN app took over, the connection can end. Confirm in Settings, under the network or VPN section, that your VPN app is the one that is set up. The official Android help page on connecting to a VPN describes the general screens.
Use Always-on VPN if your phone offers it
Always-on VPN asks Android to start the VPN as soon as the phone is ready and to keep it running. It is a helpful feature for this kind of problem, but it is not a guarantee. Read the article on Always-on VPN on Android for the details and the option that blocks connections made without the VPN.
Free some memory
If the phone is short of memory, background apps are closed more often. Removing apps you never use and avoiding a long list of apps that are kept open can reduce the number of times the VPN process is stopped.
Do not rely on swiping the app away
Swiping an app out of the recent apps list may stop it on some phones. If you swipe everything away to save battery, the VPN may go with it. Leave the VPN app alone, and use the disconnect button in the app when you want to turn it off.

A plain example
Mina uses her Android phone to connect to the VPN at a cafe at 9 a.m., then goes to work and leaves the phone in her bag. At 1 p.m. she takes it out and finds the key icon gone and her messages delayed. She does not know whether the VPN was switched off or whether the Wi-Fi at work was the cause.
She runs the short test. First she repeats the same routine for two days and notes that the icon vanishes only when the phone has been idle in her bag for about three hours, whether on the cafe Wi-Fi or on mobile data. That points to power management. She opens the battery section of the VPN app's information page and finds it set to "optimised". She changes it to "unrestricted", leaves everything else alone, and repeats the routine. For the next three days the icon stays in place.
She did not need to turn off battery saver for the whole phone or give up on the VPN. A single app setting was enough, and the test is what told her where to look. Your own phone may need a different change, such as removing the VPN from a manufacturer's sleeping apps list, but the approach is the same.
Limits and what to watch for
Changing settings does not remove every cause of a dropped VPN, and it is worth being clear about what remains.
- It is not guaranteed. Even with the best settings, a phone can still lose a connection when the network changes, when the signal is poor or when the system restarts a service. No setting turns a VPN into something that can never disconnect.
- Settings differ. Menu names, defaults and the strictness of battery tools vary between phone makers and Android versions. A step that works on one phone may not exist on another.
- Battery use may rise a little. Letting an app run without limits can use more power. For a VPN that you want connected all day, many people accept this, but watch your own battery results.
- Traffic may travel without the VPN. When the tunnel ends, apps can keep using the normal connection. Check the status before sensitive tasks, and read about the VPN kill switch to understand what extra protection your device and app can provide.
- A fault is still possible. If the VPN fails at odd times regardless of idle periods, the cause could be the network, the account or the app. The Help guide on reconnecting when the VPN disconnects gives step-by-step checks.
Also remember that a VPN protects traffic only while it is connected. If it stops, you are back to the normal protections of each app and site, such as HTTPS.
When to contact support
If you have tried the battery setting, updated the app, confirmed the permission and run the test without finding a pattern, it is reasonable to ask support for help. Give them useful details: your phone model, the Android version, the time between connecting and the drop, whether it happens on Wi-Fi, mobile data or both, and what the status bar and app showed when you came back. Do not send your password in a message. Clear notes make it much easier to tell a power-management problem from a service problem.
Summary
Android does not usually switch a VPN off after a set number of hours. The more likely causes are background limits that grow stricter over time, manufacturer battery tools, low memory, and network devices that end idle connections. A short, repeatable test shows which one applies, and a single change, usually the battery setting for the VPN app, often fixes it. Where it does not, Always-on VPN, a current app version and a check of the system VPN permission are the next steps. If you are still deciding which pass suits your routine, you can compare options on the XPASS pricing page.
Frequently asked questions
Why does my VPN turn off by itself after several hours on Android?
There are usually two kinds of cause. One is the phone limiting or stopping the app in the background to save power or memory. The other is the network ending an idle connection, for example when you move between Wi-Fi and mobile data. Both can look the same on the screen. The exact behaviour depends on your phone maker, your Android version and the app, so test on your own phone.
Is Android deliberately switching my VPN off?
Android does not normally switch a VPN off just because a timer ran out. What it does is manage background work, which can include stopping an app that has been idle, restricting it under battery settings, or removing it when memory is short. Some phone makers add extra, stricter battery tools. The result can feel like the VPN was disabled, even though the cause is power management.
Which setting should I change first?
Start with the battery setting for the VPN app. If your phone offers a choice such as unrestricted or not optimised, try it for the VPN app only, then watch for a day. Also keep the app updated and check that the system VPN permission is still in place. Change one thing at a time so you know which change helped.
Does Always-on VPN stop this from happening?
It can help, because it asks Android to keep the VPN connection running and to start it again after a restart. It is not a promise that the connection never drops, and the app's own battery limits may still matter. See the separate article on Always-on VPN for the details.
Is it risky if the VPN stops and I do not notice?
Your traffic may travel without the VPN until you reconnect. Check the key icon or the app status before sensitive tasks, and consider the block-connections-without-VPN option if your phone has it and you want that behaviour.
References
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Need a VPN for a short trip or a busy month?
XPASS sells prepaid passes for a set number of days. You pay once and nothing renews automatically.
See passesKeep reading

Device Guides
Does a VPN Drain Android Battery?
A measurement-first answer: what a VPN adds to Android power use, how to test it on your own phone, and which settings and habits keep the cost small.
9 min read

Troubleshooting
VPN Keeps Disconnecting on Android: Causes and Fixes
A diagnosis-first guide to Android VPN drops: match when the disconnect happens to its likely cause, then apply the fix that fits.
9 min read

Device Guides
Android Always-On VPN Explained
Android always on VPN keeps a VPN connected from boot and can block traffic when it drops. Learn how it works, where the switch is and what side effects to expect.
9 min read