n8n disk full: how one Gmail trigger wrote 36 GB of duplicate attachments

A client’s self-hosted n8n went down twice in six days. The disk was 96 GB, 100% full, and 36 GB of it was the same email attachments, written to disk thousands of times by a single misconfigured Gmail trigger. The credentials the client thought were deleted had never been touched. The fix took three steps: disable attachment download on the trigger, clean the temp files manually, restart n8n.

If you self-host n8n, the failure pattern below is worth checking for this week. It produces no errors until the disk is completely full, and n8n’s own data retention settings cannot prevent it.

Key takeaways

The symptom: “all my credentials are gone”

The client reported that his automations were failing with “no space” errors and that every saved credential had disappeared from the n8n interface. Credential pickers were empty and the credentials tab loaded forever.

That is two problems in one report, and only one of them was real. The disk was full. The credentials were fine.

Diagnosing the server with Claude Code over read-only SSH

I connected to the VPS hosting n8n with a read-only SSH user and pointed Claude Code at the symptoms. It checked RAM, CPU and disk, reported the volume at 100%, and when asked what was filling it, narrowed the growth down to files written by workflows sharing one specific trigger.

What was on the 96 GB disk Horizontal bar chart. Duplicate email attachments in temp: 36 GB. Execution data: 0.2 GB. System and application data: about 60 GB. What was on the 96 GB disk Duplicate attachments (temp) 36 GB Execution data (per-run folders) ~0.2 GB System, apps, other data ~60 GB Source: server forensics during the incident, August 2026
The execution data everyone worries about was 0.2 GB. The trigger’s temp output was 36 GB.

Root cause 1: a Gmail trigger downloading the same attachments forever

The original builder of the automations had enabled download attachments on a Gmail trigger. Nothing downstream ever consumed those attachments, but the setting does its work at poll time, before any workflow logic runs. Every poll, once per minute, the trigger fetched the matching messages and wrote their attachments to disk again.

The same trigger configuration was copied across multiple workflows, which multiplied the effect. The same emails, with the same attachments, were downloaded thousands and thousands of times, around the clock, into a shared temp path.

Why n8n data retention could not fix this

The obvious recommendation is to turn on execution data pruning and let n8n clean up after itself. It would not have helped here, and knowing why matters:

Retention is still worth configuring as hygiene. It is not a fix for this class of problem. The temp files had to be deleted manually, and the trigger setting turned off at the source.

Root cause 2: why the credentials looked deleted

The credentials were on disk the whole time. With zero bytes free, n8n could not load them into its runtime state, so the UI showed empty pickers while the backend kept executing scheduled workflows with those same credentials. After the disk was cleaned, a restart reloaded everything and the interface returned to normal.

The rule that came out of it: after any out-of-space event on n8n, restart the container once space is free. Freeing disk space alone does not repair state that failed to load while the disk was full.

The second outage, five days later

The first response cleaned the disk and stopped the immediate errors. It did not remove the cause, because the first pass did not dig deep enough into why the disk was filling. Five days later it was full again, on schedule.

The second pass fixed it properly. Before touching the trigger, I reviewed every workflow using the Gmail trigger with Claude Code to confirm that no business logic consumed the attachments, so disabling the download could not break anything. Then the setting went off, the temp files were removed, and the change was tested end to end. The disk has stayed at 51% since.

Disk usage across the two incidents, approximate Line chart over twelve days. Disk starts at 100 percent on day zero, drops slightly after the first cleanup, climbs back to 100 percent by day five, then drops to 51 percent after the second cleanup and root-cause fix, and stays flat. Disk usage across the two incidents (approximate) 100% 0% outage 1 outage 2 cleanup + fix at source, 51% day 0 day 5 day 12 Source: incident records, August 2026. Interim values approximate.
Cleaning without fixing the cause bought exactly five days at the observed fill rate.

How to prevent this in your own n8n instance

  1. Check host utilization now. If you self-host, look at disk, RAM and CPU on the machine running n8n before anything forces you to.
  2. Audit trigger settings, not just workflows. Any polling trigger with attachment or binary download enabled should have a consumer. If nothing uses the data, turn the setting off.
  3. Configure execution data pruning, and understand its limits: it will not clean trigger temp output.
  4. After any out-of-space event, restart n8n once space is free, and treat “missing” credentials as a load failure until proven otherwise.
  5. Add monitoring and prioritize your workflows. Decide which automations are business-critical and make sure someone, or something, notices when they stop.

FAQ

Does n8n data retention clean the temp directory? No. Execution data pruning removes per-execution records. Files written by triggers at poll time, such as downloaded email attachments, sit outside its reach and accumulate until removed manually or by a scheduled job you build yourself.

Why did n8n show empty credentials when nothing was deleted? The disk was full, so n8n could not load credential data into its runtime state. The backend, which already held them in memory, kept executing workflows normally. A restart after freeing space restored the UI.

Is it safe to disable attachment download on a Gmail trigger? Only after confirming nothing downstream consumes the attachments. In this incident, every workflow using the trigger was reviewed first to verify the business logic would survive the change.


Rimas Lukaszewicz is Head of Engineering and writes The AI Logic, a weekly newsletter on AI and automation for engineering leaders. The newsletter version of this story, told in first person, is issue #25. The audit that preceded this incident is issue #21. Not sure where AI fits in your business? Find your starting point in 3 minutes.