coollabsio/coolify · warning · Exception

Axiom log drain is not enabled.

Error message

Axiom log drain is not enabled.

What it means

Third instance of the defensive double-check: $type === 'axiom' implies is_logdrain_axiom_enabled was true seconds earlier when the type was computed at the top of handle(). The inner re-check can only fail through a concurrent settings mutation/refresh race; when it fires, the Axiom Fluent Bit config (HTTP ingest to /v1/datasets/{AXIOM_DATASET_NAME}/ingest) is never generated.

Source

Thrown at app/Actions/Server/StartLogDrain.php:92

[SERVICE]
    Flush     5
    Daemon    off
    Log_Level debug
    Parsers_File  parsers.conf
[INPUT]
    Name              forward
    tag               ${HIGHLIGHT_PROJECT_ID}
    Buffer_Chunk_Size 1M
    Buffer_Max_Size   6M
[OUTPUT]
    Name                forward
    Match               *
    Host                otel.highlight.io
    Port                24224
');
            } elseif ($type === 'axiom') {
                if (! $server->settings->is_logdrain_axiom_enabled) {
                    throw new \Exception('Axiom log drain is not enabled.');
                }
                $config = base64_encode("
[SERVICE]
    Flush     5
    Daemon    off
    Log_Level debug
    Parsers_File  parsers.conf
[INPUT]
    Name              forward
    Buffer_Chunk_Size 1M
    Buffer_Max_Size   6M
[FILTER]
    Name grep
    Match *
    Exclude log 127.0.0.1
[FILTER]
    Name                modify
    Match               *

View on GitHub (pinned to 70b9acc424)

Solutions

  1. Re-run StartLogDrain after the concurrent change completes.
  2. Keep dataset name, API key and enable flag in a single atomic settings update.
  3. Pause log-drain jobs while migrating logging providers.
Defensive patterns

Strategy: validation

Validate before calling

if (! $server->settings->is_logdrain_axiom_enabled) {
    return 'Enable the Axiom log drain (dataset + API key) before starting it.';
}
StartLogDrain::run($server);

Type guard

function activeLogDrainType(\App\Models\Server $server): string
{
    $s = $server->settings;
    if ($s->is_logdrain_newrelic_enabled) { return 'newrelic'; }
    if ($s->is_logdrain_highlight_enabled) { return 'highlight'; }
    if ($s->is_logdrain_axiom_enabled) { return 'axiom'; }
    if ($s->is_logdrain_custom_enabled) { return 'custom'; }
    return 'none';
}

Try / catch

try {
    StartLogDrain::run($server);
} catch (\Exception $e) {
    if (str_contains($e->getMessage(), 'log drain is not enabled')) {
        StartLogDrain::run($server->refresh());
    } else {
        throw $e;
    }
}

Prevention

When it happens

Trigger: A concurrent save of ServerSettings flips is_logdrain_axiom_enabled (or AXIOM_DATASET_NAME/API key) while the drain start job runs and the model relation refreshes.

Common situations: Reconfiguring Axiom logging while a restart is in flight; automation racing UI changes.

Related errors


AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17). Data as JSON: /api/errors/4d6b819afa4851de. Report an issue: GitHub.