Title: Plugin loader: one plugin's activate() failure crash-loops the whole server; isolate and retry instead · Issue #645 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Plugin loader: one plugin's activate() failure crash-loops the whole server; isolate and retry instead · Issue #645 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Plugin loader: one plugin's activate() failure crash-loops the whole server; isolate and retry instead · Issue #645 · JavaScriptSolidServer/JavaScriptSolidServer
Description: What happened A host reboot brought jspod back under pm2 before a Bitcoin node that one plugin depends on. That plugin's activate() does a fetch to the node's RPC at startup; with the node down it threw fetch failed. The loader rethrows ...
Open Graph Description: What happened A host reboot brought jspod back under pm2 before a Bitcoin node that one plugin depends on. That plugin's activate() does a fetch to the node's RPC at startup; with the node down it ...
X Description: What happened A host reboot brought jspod back under pm2 before a Bitcoin node that one plugin depends on. That plugin's activate() does a fetch to the node's RPC at startup; with the node ...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/645
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Plugin loader: one plugin's activate() failure crash-loops the whole server; isolate and retry instead","articleBody":"## What happened\n\nA host reboot brought `jspod` back under pm2 before a Bitcoin node that one plugin depends on. That plugin's `activate()` does a `fetch` to the node's RPC at startup; with the node down it threw `fetch failed`. The loader rethrows (`src/plugins.js`, \"plugin ${id}: activate() failed\"), the server exits with code 1, pm2 restarts it, and the cycle repeats. ~290 restarts over ten minutes.\n\nMeanwhile every other plugin and the plain pod itself were unavailable: `/public/...` returned connection refused, so a client that normally writes an hour file through the pod fell back to direct disk writes and corrupted a JSON file through a concurrent-write race. None of that had anything to do with the plugin that failed.\n\n```\nError: plugin plugin: activate() failed: fetch failed\n✗ Server exited with code 1\n```\n\n## Why this is a server problem, not just a plugin problem\n\nA plugin that needs an external service at activation time will fail whenever that service is not yet up, which is the normal case after a reboot. Today one such plugin takes the whole pod down with it, including unrelated plugins and core LDP serving. The failure mode is a crash loop with no degraded mode.\n\n## Suggested fix\n\n1. **Isolate activation failures.** Log the error with the plugin id, skip that plugin, and continue starting the server. The pod and the other plugins stay up. (Keep today's fail-fast behaviour behind an opt-in flag, e.g. `--plugin-strict`, for deployments that would rather not start at all.)\n2. **Optionally retry.** Re-attempt `activate()` for a failed plugin with backoff (e.g. 5 s, 10 s, 30 s, then every minute) so a dependency that comes up a few seconds later is picked up without an operator restart. Until it activates, requests under its prefix get a 503.\n3. **Surface the state.** Expose failed/pending plugins somewhere inspectable (log line at startup, and/or a field in the server info endpoint) so a crash-looping dependency is visible rather than silent.\n\nRelated: #599 (the wrap also drops `err.code`, which would help distinguish a network failure from a config error here).\n\n## Environment\n\njspod via pm2, Node v24.16.0, four plugins on the command line (`--plugin a@/x --plugin b@/y ...`). The failing one was fourth in the list; the first three had already logged \"plugin ... active\" when the process exited.\n","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-11-06T22:43:40Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/645"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b12d6f14-4af2-22dd-7640-b01eb0b51ebc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4A6:220853:A32F24:D8CCEE:6B03A672 |
| html-safe-nonce | b5c4786c527a52a1f2d04afb8a7d1ba83c3e0e1ab3d07d33061813a982f4cbd3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEE2OjIyMDg1MzpBMzJGMjQ6RDhDQ0VFOjZCMDNBNjcyIiwidmlzaXRvcl9pZCI6IjQ5NDkwMDM0NjE2MzYzNjc5ODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 214d35f9076b1096c2e1b4efb8cbc472b9546a496b5b1c92e4bc94288a6ca1ea |
| hovercard-subject-tag | issue:6251963214 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/645/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ac6b3dfa73e4af3b71b5ade7da692e0d0714611cdd15c68238978b812ff4f1f2/JavaScriptSolidServer/JavaScriptSolidServer/issues/645 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ac6b3dfa73e4af3b71b5ade7da692e0d0714611cdd15c68238978b812ff4f1f2/JavaScriptSolidServer/JavaScriptSolidServer/issues/645 |
| og:image:alt | What happened A host reboot brought jspod back under pm2 before a Bitcoin node that one plugin depends on. That plugin's activate() does a fetch to the node's RPC at startup; with the node down it ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width