flarum/framework · info

One or more extensions have changed, killing to restart.

Error message

One or more extensions have changed, killing to restart.

What it means

ServeCommand detects that one or more extensions changed state while the websocket server is running; since restart-on-change is the default (no --ignore-extension-toggles), it warns 'One or more extensions have changed, killing to restart.' and stops the loop so the wrapper restarts the server with the new extension set.

Solutions

  1. Expected behavior — let the supervisor restart the process
  2. Use --ignore-extension-toggles if you must keep connections alive through toggles
  3. Schedule extension toggles during maintenance windows
Defensive patterns

Strategy: fallback

Validate before calling

# systemd example
[Service]
ExecStart=/usr/bin/php flarum websocket:serve
Restart=always

Prevention

When it happens

Trigger: Enabling/disabling any extension via admin UI or CLI while `websocket:serve`/`serve` is running without --ignore-extension-toggles.

Common situations: Deploys or admin actions during a live serve process; supervisors then relaunch the server, briefly dropping websocket connections.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of flarum/framework@4b939f6853 (2026-09-15). Data as JSON: /api/errors/799b472146ee7565. Report an issue: GitHub.

Appendix: source

Thrown at extensions/realtime/src/Websocket/Console/ServeCommand.php:224

                    ->where('key', 'extensions_enabled')
                    ->value('value');
            }

            if ($enabled === null || $newState === $enabled) {
                $enabled = $newState;

                return;
            }

            if ($this->option('ignore-extension-toggles')) {
                $enabled = $newState;

                $this->warn('One or more extensions have changed, but ignoring due to flag --ignore-extension-toggles.');

                return;
            }

            $this->warn('One or more extensions have changed, killing to restart.');

            $loop->stop();
        });
    }
}

View on GitHub (pinned to 4b939f6853)