Upgrading¶
How-to guideThe steps for one task.
- Back up the store and confirm the master key is where you expect it.
- Stop the instance. In-flight requests drain within
shutdown.drain_timeout(30 s). - Replace the binary or the image tag.
- Start. Schema migrations run automatically and are forward-only; the log lists each one
applied.
/readyzanswers 200 when the instance serves.
What to expect¶
- Deployed configuration keeps serving exactly as before; a new version never changes what an existing revision does without a note in the release notes.
- Exports from the previous version import unchanged.
- Secrets remain readable with the same master key.
- Analytics rollups may be rebuilt when their shape changes; the log says so and the history before the change is lost. Configuration is never rebuilt. A shape change that keeps the rows (the latest stores the latency histogram as columns instead of a text) converts the tables once at the first start; an earlier version cannot read the converted tables, so a rollback restores the backup.
Request logs in Apinx Cloud (releases after 1.3.7)¶
Platform migration 0033 adds the request-log choice to each organization's export settings; every organization starts with request logs off. Nothing else changes until an organization turns them on (Traces, metrics and logs in your own tool).
Metrics, connection limits and open files (1.3.7)¶
- Platform migrations 0030 to 0032 run at the first start; 0032 adds Send metrics to each organization's export settings, off for everyone.
- The systemd unit now sets
LimitNOFILE=524288(systemd's own default since version 240, written out so an older host gives Apinx the same ceiling). Copy the unit, then runsudo systemctl daemon-reloadbefore the restart, or the running process keeps the old limit. - nginx:
worker_connections 65535andworker_rlimit_nofile 131072, with the commands in Deploying on Linux; then setcapacity.nginx_max_connectionsto$(nproc)× 65535.
Listener connection bound (releases from November 2026)¶
A listener whose limits.max_connections is 0 (the default) now accepts at most 10,000 open
connections at once, WebSocket sessions included; past that it stops accepting until one
closes, with no error. An installation that serves more sets the number it needs, or -1 for
no bound, and the change applies to the running socket at the next publish.
Capacity view (releases after 1.3.1)¶
Migration 0018 adds one column to the instances table, for the capacity each heartbeat carries;
an older instance still running beside a newer one in high availability keeps working. Nothing
else changes on its own. To have Admin › About › Capacity watch nginx as well, and to stop nginx
opening a new connection to the gateway for every request, take the upstream, map and
status-page blocks from Deploying on Linux and set
capacity.nginx_status_url.
Rolling back a version¶
Stop, restore the backup taken in step 1, start the previous binary. Migrations are not reversible, which is why the backup comes first.
Downtime¶
A single instance is briefly unavailable between stop and start, typically a few seconds. To
avoid it, run two or more instances in cluster.mode: ha over one PostgreSQL database behind
your load balancer and upgrade one at a time: drain, stop, replace, start, wait for /readyz.
See High availability.
Upgrading to 1.1.11 or later from an earlier version¶
Version 1.1.11 records two more latency ranges in analytics (the 2 s and 4 s speed-band edges). It reads rollups written by earlier versions, but an earlier version reads the new ones wrongly: it drops the two ranges and shifts the rest, and writes them back that way.
- In
cluster.mode: ha, upgrade every instance within the same few minutes: while old and new instances flush the same minute, its latency figures (p50, p95, p99, speed bands) for that minute and hour are off. Request, error and byte counts are not affected. - Rolling back to a version before 1.1.11 follows the section above (restore the backup); an older binary started on the newer analytics store reads its latency histograms wrongly.