Jump to content

SimTX API/Limits and errors: Difference between revisions

From SimTX Wiki
Clanker (talk | contribs)
Clanker moved page SimTX API/Limits and errors to SimTX API v24/Limits and errors: Archive the v24 protocol reference
Tag: New redirect
 
Clanker (talk | contribs)
Protocol v25 reference
Tag: Removed redirect
Line 1: Line 1:
#REDIRECT [[SimTX API v24/Limits and errors]]
{{SimTX API navigation}}
This page collects the error model, limits and timeouts of the [[SimTX API]] game protocol, version 25, in one place. For account service limits, see [[SimTX API/Account service#Rate limits|Account service]].
 
== Error model ==
Rejections are never silent in v25. Every failure arrives in one of three ways:
 
{| class="wikitable"
! What failed !! How it arrives !! Afterwards
|-
| The hello || [[SimTX API/Packets/ServerHello|ServerHello]] with a status other than <code>ACCEPTED</code> and a message || The connection closes.
|-
| A receiver or transmitter start || [[SimTX API/Packets/SessionStatus|SessionStatus]] <code>REJECTED</code> with <code>code</code> and <code>reason</code> || The connection closes.
|-
| A running session, stopped by the server || [[SimTX API/Packets/SessionStatus|SessionStatus]] <code>ENDED</code> with <code>code</code> and <code>reason</code> || The connection closes.
|-
| A request: control, catalog, moderation, ephemeris, passes, monitor, pointing, retune || [[SimTX API/Packets/Error|Error]] with <code>code</code>, <code>message</code> and the request's <code>request_id</code> || The session continues.
|-
| A transmitter live update || [[SimTX API/Packets/TxUpdateAck|TxUpdateAck]] with <code>accepted = false</code> for the refused fields || The session continues.
|-
| A protocol violation: a malformed frame, a frame not allowed in the session, values out of range || [[SimTX API/Packets/Error|Error]] <code>INVALID_REQUEST</code>, <code>request_id</code> 0, where the server can still send it || The connection closes.
|-
| A control rate limit || [[SimTX API/Packets/Error|Error]] <code>RATE_LIMITED</code> || The connection closes.
|}
 
v24's TxReject, TxKick and ModerationError, and the <code>ok</code>, <code>available</code>, <code>found</code> and <code>error</code> fields of several v24 responses, are all replaced by this model.
 
<syntaxhighlight lang="protobuf">
message Error {
  ErrorCode code = 1;
  string message = 2;
  int64 request_id = 3;
}
</syntaxhighlight>
 
== Error codes ==
The same [[SimTX API/Data types#ErrorCode|ErrorCode]] is used by Error and by SessionStatus.
 
{| class="wikitable"
! Value !! Code !! Meaning !! Retry the same request?
|-
| 0 || <code>ERROR_CODE_UNSPECIFIED</code> || No specific code, for example an <code>ENDED</code> session that simply ended. Unknown codes are treated the same way. || Depends on the reason
|-
| 1 || <code>ERROR_CODE_INVALID_REQUEST</code> || Malformed or out-of-range request, or a frame not allowed in this session. || No; fix the request
|-
| 2 || <code>ERROR_CODE_UNAUTHENTICATED</code> || Needs an account or a valid ticket. || After signing in
|-
| 3 || <code>ERROR_CODE_FORBIDDEN</code> || Not allowed, or the ticket's station binding does not match. || No
|-
| 4 || <code>ERROR_CODE_NOT_FOUND</code> || Unknown station, satellite, session or catalog entry. || No
|-
| 5 || <code>ERROR_CODE_LIMIT_REACHED</code> || Server, address, account or station capacity. || Later
|-
| 6 || <code>ERROR_CODE_RATE_LIMITED</code> || Too many requests. || Later, more slowly
|-
| 7 || <code>ERROR_CODE_UNAVAILABLE</code> || A transient condition: disabled, busy, or a server node not reachable. || Yes, with backoff
|-
| 8 || <code>ERROR_CODE_STATION_INACTIVE</code> || The station is deleted or deorbited, or the satellite has reentered. || No
|-
| 9 || <code>ERROR_CODE_STATION_REQUIRED</code> || Ad-hoc transmitter refused; bind one of your stations. || No
|-
| 10 || <code>ERROR_CODE_INTERNAL</code> || Server fault. || Yes, with backoff
|-
| 11 || <code>ERROR_CODE_CANCELLED</code> || Superseded by a newer request of the same kind (coverage maps). || No; the newer request is answered
|}
 
The <code>message</code> or <code>reason</code> is human-readable English. Show it to the user, but branch on the code; wording may change.
 
== Session limits ==
Each server enforces its own limits. The defaults are:
 
{| class="wikitable"
! Limit !! Whole server !! Per client
|-
| Sessions (receivers and transmitters) || 128 || 16
|-
| Receivers || 64 || 8 per IP address
|-
| Transmitters || 16 || 4 per account
|-
| Connections of any kind || 256 || 32 per IP address
|}
 
Operators can change these values, and the public deployment may use different ones.
 
* '''Receiver limits''' are counted per client IP address. A start over a limit is refused with <code>LIMIT_REACHED</code>.
* '''Transmitter limits''' are counted per account. When the ''server'' is full, transmitters wait in a queue instead (see [[SimTX API/Packets/TxQueue|TxQueue]]), unless the account holds <code>session.queue_skip</code>.
* '''Account capabilities''' (<code>game.max_stations.N</code>, transmitters on air at once; <code>game.max_receivers.N</code>; <code>game.max_sessions.N</code>; <code>tx.pa_limit.N</code>) are checked in addition to the server limits. See [[SimTX API/Permissions]].
* '''Station limits''' (<code>maxSessions</code>, <code>maxTransmitters</code>, <code>maxReceivers</code>, set by the owner and clamped by <code>game.station_sessions.N</code>) apply to station-bound sessions. The owner is not counted against the station's receiver limit. See [[SimTX API/Stations#Limits|Stations]].
 
== Rate and size limits ==
{| class="wikitable"
! What !! Limit
|-
| Control requests || 20/s per address (burst 40), heavy 4/s (burst 12); server-wide 200/s and 40/s. See [[SimTX API/Control session#Rate limits|Control session]].
|-
| Transmitter input || 1.05 × the declared rate after a burst of about 2 s; excess blocks are discarded.
|-
| TxUpdate || One applied update per 250 ms; frequency once per second.
|-
| Wideband reception || 32 million samples per second per address, plus a server-wide budget.
|-
| Frame || At most 16 MiB; the hello at most 64 KiB.
|-
| Frame shape || At most 16,384 (client frames) or 2,097,152 (server frames) nested messages, repeated string, bytes and message elements, and unknown fields; nesting at most 32 deep. See [[SimTX API/Framing#Size and shape limits|Framing]].
|-
| SampleBlock || At most 65,536 values.
|-
| NEC deck || At most 262,144 bytes.
|-
| Callsign || 1 to 64 printable characters.
|-
| Ephemeris || At most 3,600 samples per request.
|-
| Pass prediction || A window of at most 7 days.
|-
| Coverage map || 4 to 72 columns, 2 to 36 rows.
|}
 
== Timeouts ==
{| class="wikitable"
! Timer !! Value !! Effect
|-
| Preface, hello and start || 5 s through the public gateway, 15 s direct || Connection closed.
|-
| No hello at all || 20 s || Connection closed.
|-
| Receiver not reading || 5 s || Connection closed.
|-
| Transmitter not reading telemetry || 5 s || Connection closed.
|-
| Transmitter audio input stalled || 15 s || Session ended. Does not apply to IQ sources.
|-
| Account lease || About 12 h || Connection closed; reconnect with a new ticket.
|-
| Control session idle || None ||
|}
 
== Diagnosing a refused session ==
When a start is refused or a connection closes, check in this order:
# '''The code and reason.''' A SessionStatus or Error says what was wrong. Log both.
# '''Framing.''' A wrong length prefix or a missing preface makes every later byte look like garbage. Test the codec against the examples on the packet pages first.
# '''Encoding.''' Protobuf scalars are little-endian; IQ sample bytes are big-endian. Strings are UTF-8 with a varint length. UUIDs are 16 raw bytes, not text.
# '''Values.''' Latitude in −90 to 90, longitude in −180 to 180, finite floats, non-negative noise figure and frequency, positive bandwidth and sample rate, a callsign of 1 to 64 printable characters, exactly one site member.
# '''Frame order.''' A receiver may send only ReceiverRetune, AntennaPointingUpdate and Ping after its start. A control session accepts only control requests.
# '''Tickets and bindings.''' A ticket is single-use and valid for 60 seconds, for one server and one role; a station-bound start must match the station, antenna and rig of its ticket.
# '''Limits.''' Too many receivers from one address, a wideband request over budget, a full station, or control requests too fast.
 
== Reconnecting ==
SimTX has no session resumption. After any disconnect:
# If the connection was authenticated, obtain a '''new''' [[SimTX API/Game tickets|game ticket]]. Tickets are single use.
# Reconnect with exponential backoff, for example 1, 2, 4, 8 seconds and so on up to a minute, with random jitter. A client that reconnects instantly in a loop after a limit rejection will keep being rejected, and may be rate limited by the account service as well.
# Send the start again with the same settings.
 
A reconnected session is a new session with a new <code>session_id</code>, and a transmitter may have to queue again.
 
{{SimTX API navbox}}
[[Category:SimTX API]]

Revision as of 16:39, 24 October 2026

This page collects the error model, limits and timeouts of the SimTX API game protocol, version 25, in one place. For account service limits, see Account service.

Error model

Rejections are never silent in v25. Every failure arrives in one of three ways:

What failed How it arrives Afterwards
The hello ServerHello with a status other than ACCEPTED and a message The connection closes.
A receiver or transmitter start SessionStatus REJECTED with code and reason The connection closes.
A running session, stopped by the server SessionStatus ENDED with code and reason The connection closes.
A request: control, catalog, moderation, ephemeris, passes, monitor, pointing, retune Error with code, message and the request's request_id The session continues.
A transmitter live update TxUpdateAck with accepted = false for the refused fields The session continues.
A protocol violation: a malformed frame, a frame not allowed in the session, values out of range Error INVALID_REQUEST, request_id 0, where the server can still send it The connection closes.
A control rate limit Error RATE_LIMITED The connection closes.

v24's TxReject, TxKick and ModerationError, and the ok, available, found and error fields of several v24 responses, are all replaced by this model.

message Error {
  ErrorCode code = 1;
  string message = 2;
  int64 request_id = 3;
}

Error codes

The same ErrorCode is used by Error and by SessionStatus.

Value Code Meaning Retry the same request?
0 ERROR_CODE_UNSPECIFIED No specific code, for example an ENDED session that simply ended. Unknown codes are treated the same way. Depends on the reason
1 ERROR_CODE_INVALID_REQUEST Malformed or out-of-range request, or a frame not allowed in this session. No; fix the request
2 ERROR_CODE_UNAUTHENTICATED Needs an account or a valid ticket. After signing in
3 ERROR_CODE_FORBIDDEN Not allowed, or the ticket's station binding does not match. No
4 ERROR_CODE_NOT_FOUND Unknown station, satellite, session or catalog entry. No
5 ERROR_CODE_LIMIT_REACHED Server, address, account or station capacity. Later
6 ERROR_CODE_RATE_LIMITED Too many requests. Later, more slowly
7 ERROR_CODE_UNAVAILABLE A transient condition: disabled, busy, or a server node not reachable. Yes, with backoff
8 ERROR_CODE_STATION_INACTIVE The station is deleted or deorbited, or the satellite has reentered. No
9 ERROR_CODE_STATION_REQUIRED Ad-hoc transmitter refused; bind one of your stations. No
10 ERROR_CODE_INTERNAL Server fault. Yes, with backoff
11 ERROR_CODE_CANCELLED Superseded by a newer request of the same kind (coverage maps). No; the newer request is answered

The message or reason is human-readable English. Show it to the user, but branch on the code; wording may change.

Session limits

Each server enforces its own limits. The defaults are:

Limit Whole server Per client
Sessions (receivers and transmitters) 128 16
Receivers 64 8 per IP address
Transmitters 16 4 per account
Connections of any kind 256 32 per IP address

Operators can change these values, and the public deployment may use different ones.

  • Receiver limits are counted per client IP address. A start over a limit is refused with LIMIT_REACHED.
  • Transmitter limits are counted per account. When the server is full, transmitters wait in a queue instead (see TxQueue), unless the account holds session.queue_skip.
  • Account capabilities (game.max_stations.N, transmitters on air at once; game.max_receivers.N; game.max_sessions.N; tx.pa_limit.N) are checked in addition to the server limits. See SimTX API/Permissions.
  • Station limits (maxSessions, maxTransmitters, maxReceivers, set by the owner and clamped by game.station_sessions.N) apply to station-bound sessions. The owner is not counted against the station's receiver limit. See Stations.

Rate and size limits

What Limit
Control requests 20/s per address (burst 40), heavy 4/s (burst 12); server-wide 200/s and 40/s. See Control session.
Transmitter input 1.05 × the declared rate after a burst of about 2 s; excess blocks are discarded.
TxUpdate One applied update per 250 ms; frequency once per second.
Wideband reception 32 million samples per second per address, plus a server-wide budget.
Frame At most 16 MiB; the hello at most 64 KiB.
Frame shape At most 16,384 (client frames) or 2,097,152 (server frames) nested messages, repeated string, bytes and message elements, and unknown fields; nesting at most 32 deep. See Framing.
SampleBlock At most 65,536 values.
NEC deck At most 262,144 bytes.
Callsign 1 to 64 printable characters.
Ephemeris At most 3,600 samples per request.
Pass prediction A window of at most 7 days.
Coverage map 4 to 72 columns, 2 to 36 rows.

Timeouts

Timer Value Effect
Preface, hello and start 5 s through the public gateway, 15 s direct Connection closed.
No hello at all 20 s Connection closed.
Receiver not reading 5 s Connection closed.
Transmitter not reading telemetry 5 s Connection closed.
Transmitter audio input stalled 15 s Session ended. Does not apply to IQ sources.
Account lease About 12 h Connection closed; reconnect with a new ticket.
Control session idle None

Diagnosing a refused session

When a start is refused or a connection closes, check in this order:

  1. The code and reason. A SessionStatus or Error says what was wrong. Log both.
  2. Framing. A wrong length prefix or a missing preface makes every later byte look like garbage. Test the codec against the examples on the packet pages first.
  3. Encoding. Protobuf scalars are little-endian; IQ sample bytes are big-endian. Strings are UTF-8 with a varint length. UUIDs are 16 raw bytes, not text.
  4. Values. Latitude in −90 to 90, longitude in −180 to 180, finite floats, non-negative noise figure and frequency, positive bandwidth and sample rate, a callsign of 1 to 64 printable characters, exactly one site member.
  5. Frame order. A receiver may send only ReceiverRetune, AntennaPointingUpdate and Ping after its start. A control session accepts only control requests.
  6. Tickets and bindings. A ticket is single-use and valid for 60 seconds, for one server and one role; a station-bound start must match the station, antenna and rig of its ticket.
  7. Limits. Too many receivers from one address, a wideband request over budget, a full station, or control requests too fast.

Reconnecting

SimTX has no session resumption. After any disconnect:

  1. If the connection was authenticated, obtain a new game ticket. Tickets are single use.
  2. Reconnect with exponential backoff, for example 1, 2, 4, 8 seconds and so on up to a minute, with random jitter. A client that reconnects instantly in a loop after a limit rejection will keep being rejected, and may be rate limited by the account service as well.
  3. Send the start again with the same settings.

A reconnected session is a new session with a new session_id, and a transmitter may have to queue again.

SimTX API reference (protocol v25)
Start OverviewQuick startFramingData typesPacket listSchemaLimits and errorsCompatibility and versioning
Account service OverviewDevice loginServer directoryStation endpointsGame ticketsPermissionsPublic endpoints
Game protocol Connection and handshakeSession statusReceiver sessionTransmitter sessionControl sessionCatalogModeration
Stations StationsSatellitesTracking and pointing
Connection ClientHelloPingServerHelloPongErrorBanner
Session AntennaPointingUpdateSessionStatus
Receiver ForwardedClientAddressReceiverStartReceiverRetuneIqStreamDescriptorIqBlock
Transmitter TransmitterStartSampleBlockTxUpdateTxModeInfoTxQueueTxAcceptTxTelemetryTxUpdateAck
Control ListStationsStartMonitorStopMonitorWeatherMapRequestServerHealthRequestCoverageMapRequestEphemerisRequestPassPredictionRequestStationListMonitorBlockMonitorEndWeatherMapResponseServerHealthReportCoverageMapResponseEphemerisResponsePassPredictionResponseMonitorAck
Catalog CatalogListRequestCatalogFetchCatalogUploadCatalogDeleteCatalogListCatalogEntryCatalogUploadResultCatalogDeleteResult
Moderation KickRequestIpModerationRequestBroadcastBannerKickResultIpModerationResultStationImpactList
Archive Protocol v24 reference