headscale crashes with OOM when sqlite path is ommited #639

Closed
opened 2025-12-29 02:21:29 +01:00 by adam · 2 comments
Owner

Originally created by @SuperSandro2000 on GitHub (Feb 16, 2024).

Bug description

When ommiting database.sqlite.path from the config, headscale doesn't properly fallback to /var/lib/headscale/db.sqlite and instead crash loops with the following error:

Feb 15 23:54:38 hydrogen headscale-start[2491519]: 2024-02-15T23:54:38+01:00 FTL github.com/juanfont/headscale/cmd/headscale/cli/server.go:21 > Error initializing error="unable to open database file: out of memory (14)"

Environment

  • OS: NixOS unstable
  • Headscale version: 0.23.0-alpha4
  • Tailscale version: 1.58.2
  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

To Reproduce

Logs and attachments

Originally created by @SuperSandro2000 on GitHub (Feb 16, 2024). ## Bug description When ommiting database.sqlite.path from the config, headscale doesn't properly fallback to `/var/lib/headscale/db.sqlite` and instead crash loops with the following error: ``` Feb 15 23:54:38 hydrogen headscale-start[2491519]: 2024-02-15T23:54:38+01:00 FTL github.com/juanfont/headscale/cmd/headscale/cli/server.go:21 > Error initializing error="unable to open database file: out of memory (14)" ``` ## Environment <!-- Please add relevant information about your system. For example: - Version of headscale used - Version of tailscale client - OS (e.g. Linux, Mac, Cygwin, WSL, etc.) and version - Kernel version - The relevant config parameters you used - Log output --> - OS: NixOS unstable - Headscale version: 0.23.0-alpha4 - Tailscale version: 1.58.2 <!-- We do not support running Headscale in a container nor behind a (reverse) proxy. If either of these are true for your environment, ask the community in Discord instead of filing a bug report. --> - [ ] Headscale is behind a (reverse) proxy - [ ] Headscale runs in a container ## To Reproduce <!-- Steps to reproduce the behavior. --> ## Logs and attachments <!-- Please attach files with: - Client netmap dump (see below) - ACL configuration - Headscale configuration Dump the netmap of tailscale clients: `tailscale debug netmap > DESCRIPTIVE_NAME.json` Please provide information describing the netmap, which client, which headscale version etc. -->
adam added the bug label 2025-12-29 02:21:29 +01:00
adam closed this issue 2025-12-29 02:21:29 +01:00
Author
Owner

@Nickiel12 commented on GitHub (Apr 18, 2024):

This issue appeared again in alpha-8. I was getting a "out of memory" error, until I specified the full path as shown by OP.

@Nickiel12 commented on GitHub (Apr 18, 2024): This issue appeared again in alpha-8. I was getting a "out of memory" error, until I specified the full path as shown by OP.
Author
Owner

@aqxa1 commented on GitHub (Jul 13, 2024):

I've still got the issue with alpha-12. Setting sqlite instead of sqlite3 worked around the problem, although I'm not sure how they differ.

@aqxa1 commented on GitHub (Jul 13, 2024): I've still got the issue with alpha-12. Setting `sqlite` instead of `sqlite3` worked around the problem, although I'm not sure how they differ.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#639