How Can You Diagnose a VPN That Connects Only on the Second Attempt?
A VPN that fails once and then connects on retry usually has a pattern behind it. Here is how to read the timing, the network and the retry gap to find the cause.
10 min readUpdated Nov 25, 2026By XPASS Editorial Team

You tap connect, wait, and the VPN reports a failure. You tap again without changing anything and this time it connects in a couple of seconds. It is a very common experience, and because the second try works it is easy to shrug off. But a VPN that needs two attempts is giving you information. The first attempt failed for a reason, and that reason has usually gone away by the time you try again.
This article is about reading that pattern. It is not a general list of reasons a VPN cannot connect at all; for that, see why a VPN connection times out. Here the focus is narrower: the connection works, but only after a failed first try. We will look at four usual causes (a stale session, a network that is not ready, DNS that has not warmed up, and a sign-in page that is still waiting), then at what to note down, and finally at a decision table that turns your notes into a next step.
Why the second attempt works when the first does not
The key idea is that a failed first attempt changes the situation. Something was not ready, or something old was in the way, and the failed attempt gave it time to settle or cleared it out. When you retry, you are no longer starting from the same state.
Think of walking up to a door that is still being unlocked from the inside. The first push fails. Nothing is wrong with you or the door, but the first push happened too soon. A second push a few seconds later works. VPN connections behave in a similar way, because they depend on several things being in place at the same instant: a working network link, a valid address, a way to look up the server name, a path out to the internet, and a server that is ready to accept a new session.
It helps to keep in mind that apps and operating systems differ in how they handle these steps, so the explanations below describe common shapes of the problem, not a guarantee about any one product. You can still use them: each one leaves a recognisable fingerprint in your timing notes, and the notes are what matter.
There is also a small reassurance. A first-try failure that is followed by a reliable second success is not the same as a connection that is flaky once it is up. If the tunnel stays stable after it connects, the problem is limited to the moment of setting up. That narrows your search a great deal.

Cause one: a stale session
A stale session is the leftover state of a connection that used to work. Before you closed the laptop, switched from Wi-Fi to mobile data, or let the phone sit idle for hours, the app and the VPN server had an ongoing relationship tied to your old network path. Once that path is gone, the server may still hold the old session for a while, and the app may still believe it can resume it.
When you press connect, the app can try to pick up where it left off. The packets for that attempt travel on a path that no longer leads anywhere useful, so nothing comes back, and after a timeout the app reports a failure. That timeout is the cost of discovering the old session is dead. The second attempt starts fresh, with no old state to resume, so it succeeds.
What it tends to look like in your notes:
- It happens after sleep, after a network switch, or after the app has been idle for a long time.
- The first attempt runs for a noticeable time before failing, often ten seconds to a minute, because it is waiting for a reply that never comes.
- The second attempt is quick.
- Retrying works almost every time, and it works no matter how long you waited before retrying.
If this sounds like you, the pattern is close to what happens after a laptop wakes on a different network; there is a deeper look in why a VPN reconnects twice after a laptop wakes. A cleaner habit is to disconnect the VPN yourself before you sleep the device or leave a network, so there is no old session to trip over.
Cause two: the network is not ready yet
The second common cause is timing. After a wake-up or a network switch, the device may show a Wi-Fi name and a full set of bars, but the connection is not yet usable. It may still be asking the router for an address, learning where the gateway is, or waiting for the radio to settle. An app that tries to connect during that window is knocking on a door that is not open yet.
The telltale feature is how fast the failure comes. When the network is not ready, the first attempt often fails in a second or two, because there is simply nowhere to send the packets. The app says it could not reach the server, or it reports no connection, almost instantly.
What it tends to look like in your notes:
- The first attempt fails very quickly, within a few seconds.
- It happens right after wake-up, right after joining a network, or right after switching between Wi-Fi and mobile data.
- If you wait ten to twenty seconds before the first tap, it often works the first time.
- Opening a normal website with the VPN off right after the failure usually works, because by then the network has caught up.
The fix is simple and costs nothing. Before you connect, check that the network is truly ready: the Wi-Fi icon is steady, and a normal web page loads with the VPN off. If you switched networks, give it a few seconds. If your app offers an option to reconnect automatically on network changes, leave it on, because that moves the retry into the app and out of your hands. When the retry gap you need is longer than a minute, see the notes on slow networks in the timeout article linked above.
Cause three: DNS has not warmed up
Before an app can connect to a VPN server it usually has to turn the server's name into an address. That lookup is DNS, and it can be slow the first time. The device may have just joined a network and not yet received a working resolver. The resolver itself may not have the name cached and need extra time to fetch it. On some networks the first lookup after a quiet period is noticeably slower than later ones. If you want the basics, what DNS is is explained clearly by Cloudflare's learning pages.
If the first lookup takes longer than the app is willing to wait, the attempt fails. By then the answer has often arrived and been cached, so the second lookup is instant and the connection goes through.
What it tends to look like in your notes:
- The first attempt fails after a moderate wait, longer than the "network not ready" case but shorter than a stale-session timeout.
- It happens when you first join a network or after a long idle period.
- Websites you have not visited recently are also slow to open for the first time, then fast.
- Switching the device to a different network can make the pattern disappear or move.
You cannot fix a slow resolver on someone else's network, but you can confirm the idea cheaply. With the VPN off, open a site you have not visited today and watch whether the first load pauses before the page starts. If it does, DNS warm-up is a strong suspect. Retrying a few seconds later, or opening any web page first so the lookup path is warm, is a reasonable workaround. For more on how name lookups interact with a VPN, read a general explainer on DNS first.
Cause four: a captive portal is still waiting
Many hotels, cafes, airports and offices put a sign-in or terms page in front of their Wi-Fi. Until you accept it, the network may allow almost nothing through, and that includes the traffic a VPN needs to set up. Your device may even say it is connected to Wi-Fi while the page that would let you online has not appeared, or is hiding behind a notification you did not tap.
In this case the first attempt fails because the network is blocking it, not because anything is slow. What makes it look like a second-attempt success is that in between you opened a browser, dismissed the page or accepted the terms, and the second attempt had a clear path.
What it tends to look like in your notes:
- It happens on public or shared Wi-Fi, never on your home network.
- The first attempt fails soon after you join the network and before you have loaded any page.
- You did something in between: tapped a notification, opened a browser, tapped accept.
- With the VPN off, a normal web page shows a sign-in screen or an error before you accept the terms.
The fix is to complete the sign-in first, confirm that a normal page loads, and only then connect the VPN. There is a full walk-through in what to do when a VPN meets a captive portal. Be careful with any page asking for more than a simple accept or a room number, and see the FTC's advice on public Wi-Fi if a login page seems unusual.
What to note down
You do not need special tools. A few lines in a notes app, kept for a handful of occurrences, are enough. Record these four things each time the first attempt fails:
- The network type: your home Wi-Fi, a public or shared Wi-Fi, a mobile hotspot, or mobile data.
- What happened just before: waking from sleep, switching networks, coming out of airplane mode, a fresh app start, or nothing at all.
- How long the first attempt ran before it failed, to the nearest few seconds.
- How long you waited before the second attempt, and whether you did anything in between.
The retry gap deserves special attention. If the second attempt works even when you retry instantly, the culprit is probably stale state that the failure cleared. If it works only after you waited or did something in between, the culprit is probably readiness: the network, DNS or a sign-in page.
A simple extra test is to retry with a deliberate pause. After a failure, wait thirty seconds and try again. Then repeat the whole thing another day but wait for the network to be ready before the first attempt. Comparing the two tells you whether timing is the whole story.
A decision table
Put your notes against the table below. It is a guide to what to try first, not a diagnosis, and more than one row can apply at once.
| What you noted | Most likely cause | What to try first |
|---|---|---|
| Happens after sleep or a network switch; first try runs 10-60 seconds then fails; instant retry works | Stale session | Disconnect before sleep or leaving a network; reconnect after the network is steady |
| First try fails in 1-3 seconds right after wake or joining a network; waiting 20 seconds avoids it | Network not ready | Wait for a steady Wi-Fi icon and a loading web page before connecting |
| First try fails after a moderate wait; first visits to new sites are also slow; works on retry a few seconds later | DNS warm-up | Open a web page first, then connect; compare on another network |
| Only on public or shared Wi-Fi; works after you tapped a notification or accepted terms | Captive portal | Finish the sign-in, confirm a page loads, then connect |
| Happens on home Wi-Fi at any time of day, not tied to sleep or switching | Possible app, device or router issue | Update the app and device, restart both, then note details for support |
| Second attempt also fails some of the time | Not just first-try timing | Treat as a connection that is failing, not slow; see the timeout article |
If your first attempt consistently fails and the cause seems to be at the connection stage rather than after it, the difference between a handshake failure and a data-flow failure is explained in handshake timeouts versus data timeouts. Knowing which side failed makes the table even more useful.

A plain example
Mai uses her laptop in a cafe, closes the lid and walks home. At home she opens the lid, taps connect in the VPN app straight away and sees it fail after about two seconds. She taps again and it connects. She wonders whether something is wrong with her pass.
She keeps notes for three days. The failure always follows opening the lid at home. It always fails in two to three seconds. When she waits until a web page loads before tapping connect, the first attempt works. One evening she tries the same thing at a friend's flat and gets the same result. Her notes point at "network not ready" and not at a stale session, because the first attempt fails so quickly and waiting avoids it.
Her fix is a habit: after waking the laptop she checks that a normal site loads, and only then taps connect. She also turns on the app's option to reconnect automatically after a network change, if it has one. She does not need to contact anyone, and nothing was wrong with the pass.
A different person with the same symptom, whose first attempt always ran for thirty seconds before failing and who always succeeded on an instant retry, would be looking at a stale session. The table gives each person a different first step because the notes are different.
Limits and what to watch for
Timing explanations are useful, but they have limits. Keep these in mind.
- A pattern is a clue, not proof. Apps and operating systems differ, and two causes can overlap. Test one change at a time.
- A VPN does not make an unreliable network reliable. If the Wi-Fi itself drops packets, you may see failures that look like first-try problems. Check whether ordinary pages also stall; latency and weak signal can mimic everything above.
- Repeated failures on a stable home network, at all times of day, are less likely to be timing and more likely to be an app, device or router issue. Update the app and the operating system, restart the device and the router, and look at the setup steps again.
- Do not change security settings, firewall rules or router options on someone else's network to make the first attempt succeed. If a public network blocks the connection, that is its choice, and the best you can do is choose a different network.
- Do not treat a retry loop as a solution on a network you do not trust. If you must retry many times to get connected, stop and check that you are on the right network and that you are signed in to the real sign-in page.
- If you reinstall the app or reset network settings to chase this problem, remember that you will need your VPN username and password from the My Pass page again, not your XPASS website sign-in.
A calm order to work through
If you want one sequence to follow, use this. Stop as soon as the problem is solved.
- Wait for the network to be ready. Steady Wi-Fi icon, a normal page loads with the VPN off.
- If you are on a public network, finish any sign-in page first.
- Disconnect the VPN manually before you sleep the device or leave a network next time, so there is no stale session.
- Turn on the app's automatic reconnect option if it has one, and leave the rest of its settings at the defaults.
- Update the app and the operating system, then restart the device.
- Keep the four-line notes for a few occurrences. Compare the retry gap and the first-attempt duration with the table.
- If the pattern continues on more than one network, contact support with your notes.
Summary
A VPN that connects only on the second attempt usually failed for a reason that has gone away by the retry: an old session, a network that was not ready, a DNS lookup that had not warmed up, or a sign-in page that was still waiting. Four short notes (network type, what happened before, how long the first attempt ran, and your retry gap) are enough to tell these apart with the decision table. Waiting for a steady network, finishing sign-in pages first and disconnecting before you sleep or move solve most cases, and persistent failures on a stable network are worth taking to support.
If you want a pass you can reconnect with whenever you need it, you can look at the XPASS pricing page and choose the number of days that fits your plans.
Frequently asked questions
Why does my VPN fail the first time and work the second time?
A common reason is that the first attempt starts before something is ready: the Wi-Fi may not have finished joining, DNS may not have warmed up, a sign-in page may still be pending, or an old session from before sleep or a network change is still in the way. By the second attempt those things have settled. The exact cause depends on your device, app and network.
Is a VPN that needs two tries broken?
Not necessarily. If it happens only after sleep, after switching networks or on a hotel or cafe network, it is usually a timing issue and not a fault with your pass. It deserves attention when it happens on a stable home network every single time, or when the second attempt also fails sometimes.
What should I write down to find the cause?
Note the network type (home Wi-Fi, public Wi-Fi, mobile data), what happened just before (wake from sleep, network switch, fresh app start), how many seconds the first attempt ran before failing, and how long you waited before retrying. Those four details separate most causes.
Should I just wait longer before the first attempt?
Waiting until the Wi-Fi icon is steady and a normal web page loads is a harmless habit and often removes the problem. If the first attempt still fails after the network is clearly ready, look at stale sessions or the app itself.
When should I contact support?
If the pattern continues on more than one network after you have updated the app and restarted the device, or if the second attempt fails as well. Bring the device and operating system, the app version, the network type and your timing notes.
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

Troubleshooting
VPN Connection Timed Out: Causes and Solutions
A timeout is the VPN app giving up on waiting. This guide explains what was being waited for, which causes are most likely and how to fix them in a sensible order.
9 min read

Troubleshooting
VPN Won't Reconnect After Sleep Mode
Why a VPN tunnel dies while your device sleeps, how to tell a stale connection from a real fault, and the exact steps to get it back on every wake-up.
9 min read

Troubleshooting
VPN Problems with Hotel and Airport Wi-Fi Login Pages
Hotel, airport and cafe Wi-Fi often needs a web login before anything works, and that can trap a VPN. Here is the order of steps, and fixes when the page will not show.
9 min read