LemmyNet/lemmy · error

plugin timeout

Error message

plugin timeout

What it means

Timeout sentinel raised while fetching a WASM plugin from its instance pool: Pool::get(GET_PLUGIN_TIMEOUT) returned nothing within the configured timeout, meaning no plugin instance was free to acquire (all instances busy or the wasm module failed to build/return in time). The input at fault is the plugin named `name` whose pool is exhausted or whose builder is too slow.

Source

Thrown at crates/api/api_utils/src/plugins.rs:287

      let builder = move || PluginBuilder::new(manifest.clone()).with_wasi(true).build();
      let pool = Pool::new(builder);
      if let Some(mut p) = pool.get(GET_PLUGIN_TIMEOUT)?
        && p.function_exists("init")
      {
        p.call::<_, ()>("init", ())?;
      }
      Ok(LemmyPlugin {
        pool,
        filename: filename.unwrap_or(settings.file),
      })
    }

    #[expect(clippy::if_then_some_else_none)]
    fn get(&self, name: &'static str) -> LemmyResult<Option<PoolPlugin>> {
      let p = self
        .pool
        .get(GET_PLUGIN_TIMEOUT)?
        .ok_or(anyhow!("plugin timeout"))?;

      Ok(if p.function_exists(name) {
        Some(p)
      } else {
        None
      })
    }
  }

  impl LemmyPlugins {
    /// Load and initialize all plugins
    pub fn get_or_init() -> Self {
      static PLUGINS: LazyLock<LemmyPlugins> = LazyLock::new(|| {
        let mut plugins: Vec<_> = SETTINGS
          .plugins
          .iter()
          .flat_map(|p| {
            LemmyPlugin::init(p.clone())

View on GitHub (pinned to 439734dd63)

Solutions

  1. Increase the GET_PLUGIN_TIMEOUT or pool capacity for heavily used plugins.
  2. Check plugin initialization (`init` call) for hangs or slow builds that starve the pool.
  3. Retry the plugin call; pool timeouts are typically transient under load.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/api/api_utils/src/plugins.rs:287 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of LemmyNet/lemmy@439734dd63 (2026-09-06). Data as JSON: /api/errors/10ccdb77c8e34254. Report an issue: GitHub.