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
- Re-run StartLogDrain after the concurrent change completes.
- Keep dataset name, API key and enable flag in a single atomic settings update.
- 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
- Save AXIOM_DATASET_NAME, AXIOM_API_KEY and the enable flag atomically.
- Don't reconfigure Axiom settings while a drain start/stop job is in the 'high' queue.
- Pre-check with $server->isLogDrainEnabled() before showing 'Start Log Drain' actions.
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
- New Relic log drain is not enabled.
- Highlight log drain is not enabled.
- Custom log drain is not enabled.
- Unknown log drain type.
- Invalid Cron / Human expression for Disk Usage Check Frequen
AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17).
Data as JSON: /api/errors/4d6b819afa4851de.
Report an issue: GitHub.