Skip to content

Out of Memory error #45

Description

@tschettervictor

Error when running as non-root user for the first time.

To Reproduce

  1. Follow install instructions that build from source.
  2. Try to start tinyice using the supplied rc script.

Expected behavior
Just work.

Desktop (please complete the following information):

  • OS: FreeBSD
  • Browser N/A
  • Version N/A

I have built and have successfully configured tinyice. That is not the issue. The issue is that when I install it for the first time, and try to run it as user 'tinyice', it fails with the following error:


2026-07-13T22:30:32.535Z        FATAL   server/server.go:129    Failed to initialize history manager: unable to open database file: out of memory (14)

I am running on FreeBSD using the following rc script:

#!/bin/sh
#
# Tinyice FreeBSD Service Script
#
# PROVIDE: tinyice
# REQUIRE: NETWORKING
# KEYWORD: shutdown
#
# Optional settings:
# tinyice_enable (YES/NO):      Enable or disable the service.
# tinyice_host (IP):            Service host.
# tinyice_port (port):          Service port.
# tinyice_config (path):        Path to application config directory.
# tinyice_user (user):          User to run the service as.
# tinyice_group (group):        Group to run the service as.
#

. /etc/rc.subr

name=tinyice
desc="Tinyice Streaming Server"
rcvar=tinyice_enable

load_rc_config $name

: ${tinyice_enable:="NO"}
: ${tinyice_user:="tinyice"}
: ${tinyice_group:="tinyice"}
: ${tinyice_host:="0.0.0.0"}
: ${tinyice_port:="8000"}
: ${tinyice_config:="/usr/local/etc/tinyice/tinyice.json"}

pidfile="/var/run/${name}/${name}.pid"
command="/usr/sbin/daemon"
command_args="-P ${pidfile} -H -o /var/log/${name}/${name}.log /usr/local/bin/${name} --config ${tinyice_config} --host ${tinyice_host} --port ${tinyice_port}"

start_precmd="tinyice_startprecmd"

tinyice_startprecmd()
{
    mkdir -p /var/run/${name}
    mkdir -p /var/log/${name}
    chown -R ${tinyice_user}:${tinyice_group} /var/run/${name}
    chown -R ${tinyice_user}:${tinyice_group} /var/log/${name}
}

run_rc_command "$1"

If, however I change the tinyice_user variable to root and start the server, then stop it, I can the change the user back to tinyice and it will work.

Why does it not work on the first service start though?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions