When MT4 keeps disconnecting on a VPS, the break is in one of three places: the broker side (server maintenance, an account problem, a poor access point), the network path between the VPS and the broker, or the VPS itself (a frozen terminal, a Windows restart, memory running out). The terminal's status bar, its Journal and Experts logs, and the Windows Event Viewer together tell you which one in a few minutes. The fix depends entirely on the answer, so find the place first. Everything below applies to MT5 as well, with the small differences noted.
The three places a disconnect comes from
| Where | Typical causes | What you see |
|---|---|---|
| Broker side | Server maintenance or restart, weekend, wrong or changed login, expired demo, account moved to another server, a poor access point | Status bar message such as No connection or Invalid account; the Journal records the lost connection and the login attempts that follow |
| Network path | Unstable route between the VPS data center and the broker's servers | Short drops that reconnect by themselves; other terminals on the same VPS that use the same broker drop at the same time, terminals on other brokers often do not |
| The VPS itself | Terminal frozen, Windows restarted, too little RAM, terminal closed by a sign-out | No lost-connection line before the gap, a fresh terminal start in the log, a restart in Event Viewer |
The key difference: when the broker or the network drops you, the terminal is still running, so it writes the disconnect and its attempts to log in again into the Journal. When the terminal or the VPS is the problem, there is no disconnect line at all. A quiet Journal on its own proves nothing: a connected terminal writes nothing there for hours when nothing happens.
Step 1: read the status bar
The connection status sits in the bottom-right corner of the terminal.
| Message | What it means | First fix |
|---|---|---|
| No connection | The terminal cannot reach the trade server: network trouble or a server that is down | Rescan servers (Step 4), check the broker's status page or announcements |
| Invalid account | The server answered but rejected the login: wrong account number, password or server, or an expired demo account | Check the login, password and server name the broker currently shows; open a new demo if it expired |
| Common error | The terminal is not logged in correctly, like the two above | Log in again from the File menu, then rescan servers; if it persists, ask the broker |
| Connected, but prices do not move | Often the market is closed or the symbol is not trading | Check the trading hours of the symbol before you look for a fault |
Two cases are normal. At the weekend prices stop, and many brokers do maintenance on their servers while the markets are closed, so short drops then are expected. If the drops happen only in that window, nothing is wrong with your VPS.
Account issues that look like disconnects: a password reset on the broker portal makes the old saved password fail; logging in with the investor (read-only) password connects but rejects orders; and a broker that moves accounts to a new server name leaves the old one refusing you. Your broker's help pages are a useful second check; Libertex, for example, explains Invalid account and No connection in these terms.
Step 2: read the Journal and Experts logs
- The Journal tab (in the Terminal window in MT4, the Toolbox in MT5) records connections, logins and disconnects.
- The Experts tab records what your EAs print and their errors.
- Both are saved as daily files. Open them from the File menu with "Open Data Folder": the Journal is in the
logsfolder, the Experts log inMQL4\Logs(MT4) orMQL5\Logs(MT5).
What each case looks like:
| Case | Journal | Experts log |
|---|---|---|
| Broker or network drop | A line saying the connection was lost, then login attempts, then a successful login once the server answers | EA messages continue; trade errors may appear while disconnected |
| Account rejected | Repeated login attempts that fail with the same reason | EAs load but cannot trade |
| Terminal frozen | No lost-connection line; the terminal stopped responding on screen, then entries resume or the terminal starts again | EAs silent for the same stretch |
| VPS restarted | Nothing until the terminal starts again, if it starts at all | EAs load again at the restart time |
Write down the time of each disconnect from the Journal. You need it for Step 3.
Step 3: check whether the VPS restarted
- Open Task Manager on the VPS (right-click the VPS taskbar and choose Task Manager), go to Performance, select CPU and read "Up time". Count back from now: if Windows started at about the time of a disconnect, the restart explains it.
- For the details, open Event Viewer (type
eventvwrin the Start menu), go to Windows Logs, right-click System and choose "Filter Current Log". - Enter
41, 1074, 6006, 6008, 2004in the event ID field. - Read them against your disconnect times, using Microsoft's descriptions:
- 1074: an application (such as Windows Update) or a user restarted or shut down the machine. A planned restart.
- 6006: Windows shut down cleanly.
- 41 and 6008: the previous shutdown was unexpected. Windows did not shut down properly.
- 2004: Windows found a low virtual memory condition and lists the programs using the most memory. If a terminal is on that list, RAM is your problem.
If you find a 1074 from Windows Update, set a time you choose for updates. A stop or restart forced from outside Windows, such as from your provider's control panel, can also be logged as unexpected. If you find 41 or 6008 and neither you nor anyone with access stopped the VPS, send the times to your provider. After any restart, make sure the terminals start again by themselves after a reboot: a short restart that leaves MT4 closed for hours is the costly part.
No restart, but a gap in the Journal and the terminal not responding: the terminal froze. Check memory and CPU as in why a trading VPS gets slow, then restart the terminal.
Step 4: rescan servers or pick another access point
Brokers usually publish several access points (entry addresses for the same trade server). The terminal picks one, and it is not always a good one.
- Click the connection status in the bottom-right corner.
- Choose "Rescan servers" and wait for the list to refresh, as the RoboMarkets FAQ describes.
- If the status stays red, click it again and select another access point from the list. Admirals suggests choosing on both speed (ping) and connection stability (the green bars), not ping alone.
- If nothing connects, log in again from the File menu with the details from the broker.
Step 5: isolate the network path
If the terminal keeps running and the account is fine, compare:
| Test | Result | Points to |
|---|---|---|
| A second terminal on the same VPS, different broker | Both drop at the same moments | The VPS network or the VPS itself |
| Same check | Only one broker drops | That broker or the route to it |
| Same account on your home PC at the same times, logged in with the investor (read-only) password and no EA attached, so nothing trades twice | Home stays connected while the VPS drops | The route from the VPS to that broker |
| Same check | Both drop together | The broker side |
When a different VPS location helps
| Situation | Does moving the VPS help |
|---|---|
| Drops only toward one broker, home PC stays connected, rescans do not help | It can: a location closer to the broker's servers usually means a shorter route, though not always a more stable one |
| Drops only while the market is closed at the weekend | No, that is usually broker maintenance |
| Invalid account or Common error | No, it is a login problem |
| Gaps in the Journal, restarts in Event Viewer, low-memory warnings | No, the problem is inside the VPS |
| Several brokers drop together from the same VPS | Possibly, but raise it with your provider first |
Ask your broker where its trade servers are before you move: the country of the broker's head office does not tell you that.
When the VPS is not the right place to look
If the Journal shows the broker rejecting or dropping you, a different VPS, a larger plan or a reinstall will not change it. Contact the broker with the Journal lines and times. Also note that losing your Remote Desktop session is not an MT4 disconnect: the terminals keep running when the Remote Desktop window closes. Signing out of Windows is different, it closes them.
How this works on Dipgate
- On a Trading VPS, the client area lets you start and stop the VPS and open a VNC console, which can help when Remote Desktop itself will not connect. If you stop or restart the VPS from there, note the time, so you do not mistake that restart for a fault when you read Event Viewer later.
- On a Trading VPS, Dipgate sets up autologin. Put each platform's shortcut in the "My Platforms Autostart" folder so the terminals start after a reboot, as explained in the knowledge base. If you change the VPS password, redo the autologin.
- The stuck VPS article covers memory and overload causes and the local connection side; if those checks do not solve it, open a support ticket with the times from your Journal and Event Viewer.
- The location of a Dipgate VPS is chosen at order, from the cities listed in the cart for each product. If your checks point to the route to one broker, ask support before you plan a move.
