Skip to content

Troubleshooting

Common problems with the DuckDB Analytics AMI, what causes them and how to fix them.

The demo says first boot did not complete

Cause: sushi-duckdb-firstboot.service has not finished or failed, so /etc/duckdb and /var/lib/duckdb are missing.

Fix: Wait for cloud-init, then check the service and its log:

sudo cloud-init status --wait
systemctl status sushi-duckdb-firstboot.service
sudo journalctl -u sushi-duckdb-firstboot.service --no-pager

If it failed, keep a copy of the log, then run it again:

sudo systemctl restart sushi-duckdb-firstboot.service

duckdb.env contains an unexpected setting

Cause: /etc/duckdb/duckdb.env has a line other than DUCKDB_MEMORY_LIMIT=, DUCKDB_MAX_TEMP_DIRECTORY_SIZE=, a blank line or a # comment.

Fix: Remove the extra line. See Change the memory and spill limits.

DuckDB memory or temp cap is not a plain size

Cause: A limit is not a whole number followed by MB or GB, for example 2.5GB or 2 GB.

Fix: Use a value such as 2560MB or 3GB.

SQL file must be a readable regular file

Cause: The path you passed to duckdb-sql does not exist, is a symbolic link, or your user cannot read it.

Fix: Pass the path of a regular file your user can read. For the S3 file, run the command as duckdb with sudo -u duckdb.

A query runs out of memory or spill space

Cause: The query needs more than the memory limit or the spill cap.

Fix: Raise DUCKDB_MEMORY_LIMIT or DUCKDB_MAX_TEMP_DIRECTORY_SIZE in /etc/duckdb/duckdb.env. Use a larger instance or root volume if needed.

An S3 query fails

Check, in order:

  1. You ran the file as duckdb: sudo -u duckdb /opt/sushi/bin/duckdb-sql /etc/duckdb/secrets/customer-s3.sql.
  2. The file is root:duckdb, mode 0640.
  3. CREATE SECRET and the query are in the same file. A secret does not carry over between runs.
  4. The instance has an IAM role with s3:ListBucket on the bucket and s3:GetObject on the prefix.
  5. REGION matches the bucket's Region, and the instance has outbound HTTPS to S3.

ubuntu cannot read /etc/duckdb/secrets

This is expected. The folder is only readable by root and the duckdb group. Do not change its permissions or add ubuntu to the group.

Last updated October 11, 2026 · Suggest an improvement