APITube Help Center

How to Fix SSE Stream Problems (ER0360, Disconnects)

Check silent streams, connection slots and disconnect codes

Erick Horn

Written by Erick Horn

July 6, 2026

Updated October 16, 2026

Open this example in the API Playground ↗

How to fix SSE stream problems (ER0360, disconnects)

If an SSE stream is silent, check whether new articles match its filters. For ER0360, close unused sessions to free connection slots. For a disconnect, read the error event before reconnecting; some, such as the six-hour limit, are expected.

Why is my stream connected but silent?

A fresh stream sends new matches, without replaying historical results. It checks about every 30 seconds and sends up to 50 articles per cycle. Narrow filters can leave long quiet periods. Heartbeat comments starting with : arrive about every 30 seconds and are free.

Test your filters with a search:

curl "https://api.apitube.io/v1/news/everything?title=acme&language.code=en&api_key=YOUR_API_KEY"

A search with few matches may also produce few live events. Try wider filters; see empty search results. Check your key mode too: a test key returns preview article text, which can affect text checks in your app.

How do I fix “Maximum SSE connections” (ER0360)?

429 ER0360 means your account’s SSE slots are occupied. Free allows 1 connection, Starter and Basic 2 each, Professional 10, and Corporate 50.

A clean close frees a slot immediately. After a crash or network failure, a dead connection may take a few minutes to clear. These free management endpoints let you inspect and close sessions:

# See which sessions are holding your slots
curl "https://api.apitube.io/v1/news/stream/sessions" -H "X-API-Key: YOUR_API_KEY"

# Free them all (or one: ?session_id=..., or per key: ?api_key_id=...)
curl -X DELETE "https://api.apitube.io/v1/news/stream/sessions" -H "X-API-Key: YOUR_API_KEY"

GET lists session_id, api_key_id and started_at. DELETE closes all sessions, or only those selected with session_id or api_key_id. Closed streams receive ER0364. Check which sessions you need before closing them.

Why did my stream disconnect?

  • ER0362: the six-hour session limit. Reconnect with the last event ID.
  • ER0301: available streaming funds ran out. Add funds or wait for quota renewal.
  • ER0361: the key was revoked. Use a valid key.
  • ER0364: the session was closed through the session-management endpoint.

A network failure may close the connection without an error event. Browser EventSource reconnects with the last event ID automatically. Custom clients should send Last-Event-Id; see the SSE guide.

Why do articles arrive late or out of order?

Articles can become available after their original publication time, so published_at may be older than the articles you received before it. Live delivery reports new availability; it does not guarantee publication order. See how fresh the data is.

Use stream.max_age to exclude articles published more than a set number of minutes ago:

curl -N -H "X-API-Key: YOUR_API_KEY" \
  "https://api.apitube.io/v1/news/stream?language.code=en&stream.max_age=60"

The value must be a positive whole number of minutes. Invalid values return 400 ER0363.

Do parallel streams multiply my bill?

Yes. Each connection charges one streaming credit per article it delivers. Three streams receiving the same article use three credits. Use one stream per filter set and share its events within your app if several consumers need them.

Common Questions

Do heartbeats or the open connection cost credits?

No. Only delivered articles use streaming credits. Idle connections, heartbeat comments and the session-management endpoints are free.

Can I resume after the 6-hour disconnect without losing articles?

Send the last processed event’s id: in Last-Event-Id when reconnecting. The stream resumes after that ID, then continues with new matches.

Does closing a stream free the slot instantly?

A clean close does. After a crash or network failure, use the session-management endpoints to find and close a session that still occupies a slot.

Why was my connection rejected with ER0176?

402 ER0176 means no streaming funds were available when you connected. Check streaming quota and pay-as-you-go settings. ER0301 means funds ran out after the stream opened. See what counts as a request.


Related Articles