askacharge.com Blog
ESEN
For your brand

OCPP charger keeps disconnecting every few minutes: causes and fix

The charger connects, works for a while and drops: every 1, 5 or 10 minutes. Why it happens (heartbeats, WebSocket ping, mobile networks, routers) and how to make it stable.

askacharge.com · OCPP errors · Updated 11 October 2026

What happens

The charger shows as connected, after a while it disconnects and reconnects, over and over. If the drops come at a fixed rhythm (every 60 s, every 5 minutes), it's almost never the server: something in between closes connections that look idle.

Check it in two minutes

Leave the charger connected to the test server for a while and check in the log how often it disconnects, whether it sends heartbeats, and whether after each drop it introduces itself again with BootNotification (it restarted) or just reconnects (it's the network). Open the OCPP test server →

The causes, most likely first

1. The network closes connections that stay quiet

Routers, mobile operators (4G) and some firewalls drop a TCP connection after a while without traffic. An OCPP WebSocket can stay silent for minutes between heartbeats.

How to fix it: Lower the heartbeat interval (HeartbeatInterval, which the server proposes in the BootNotification response) or enable the WebSocket ping (WebSocketPingInterval in 1.6) at 30-60 s.

2. WebSocket ping is off or too long

With WebSocketPingInterval=0 the charger sends no pings, and if the server doesn't either, nothing keeps the connection alive.

How to fix it: Set it between 30 and 60 seconds.

3. Weak mobile coverage

With a SIM at the edge of coverage, every dip drops the connection. You can tell because the drops have no fixed rhythm.

How to fix it: External antenna, another operator, or a cable.

4. The charger restarts

A watchdog firing, a power cut or unstable firmware. You can tell because a new BootNotification arrives after each drop.

How to fix it: If a BootNotification comes with every reconnection, look at the firmware and power supply, not the network.

What askacharge.com does

A disconnecting charger fires the charger.offline webhook at once, but the email alert waits two minutes and only goes out if it hasn't come back: a restart or a few seconds' drop won't flood your inbox.

Frequently asked questions

How often should an OCPP charger send heartbeats?

The server decides in the BootNotification response (interval). 60 to 300 seconds is usual; if the network drops idle connections, stay close to 60.

What is WebSocketPingInterval?

An OCPP 1.6 configuration key that sets how many seconds between the charger's WebSocket pings to keep the connection alive. 0 turns it off.

Other OCPP errors

Related reading

What's in front of you?

I'm at the charger

Try it in a minute on the OCPP test server: no account, you see live what it sends and what would fail on a real connection.

Test my charger

My charger has been down for a while

If the platform that ran it shut down, stopped supporting it or the contract ended: 3 months free and basic setup on us. We help you remotely.

Ask for the rescue terms

It connects, I want to run it

Dashboard, tariffs, QR payments and API. 30 days free, no card, no commitment.

Create an account

Won't connect? Send us the model and what you see and we'll tell you by email what to change. Free. info@askacharge.com

Is it your home charger? We're preparing askacharge.com/casa: your charger in the cloud with your own API, for Home Assistant or whatever you use. The first one free. Waiting list