Hey.
I have an OpenBalena instance installed on a DigitalOcean droplet (1 CPU & 1GB RAM)
All working fine for a while. On the 7th of September, my RPi’s LED started to blink, indicating a loss of connection to the server.
After investigation, I cannot use the CLI, I get a 500 Service Unavailable
.
Here is the logs of the database from the last reboot back in mid August, retrieved using ./scripts/compose logs
(no errors in the other containers, so I didn’t copy the whole thing).
db_1 | 2019-08-26 14:47:48.496 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2019-08-26 14:47:48.496 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2019-08-26 14:47:48.501 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2019-08-26 14:47:48.533 UTC [21] LOG: database system was shut down at 2019-08-26 14:26:17 UTC
db_1 | 2019-08-26 14:47:48.545 UTC [1] LOG: database system is ready to accept connections
db_1 | 2019-08-26 14:48:08.325 UTC [28] ERROR: relation "uniq_model_model_type_vocab" already exists
db_1 | 2019-08-26 14:48:08.325 UTC [28] STATEMENT: CREATE UNIQUE INDEX "uniq_model_model_type_vocab" ON "model" ("is of-vocabulary", "model type");
db_1 | 2019-08-26 15:12:23.535 UTC [54] ERROR: duplicate key value violates unique constraint "service_application_service name_key"
db_1 | 2019-08-26 15:12:23.535 UTC [54] DETAIL: Key (application, "service name")=(1, main) already exists.
db_1 | 2019-08-26 15:12:23.535 UTC [54] STATEMENT: INSERT INTO "service" ("application", "service name")
db_1 | VALUES ($1, $2) RETURNING "id";
db_1 | 2019-08-26 19:16:32.708 UTC [330] ERROR: duplicate key value violates unique constraint "service_application_service name_key"
db_1 | 2019-08-26 19:16:32.708 UTC [330] DETAIL: Key (application, "service name")=(1, main) already exists.
db_1 | 2019-08-26 19:16:32.708 UTC [330] STATEMENT: INSERT INTO "service" ("application", "service name")
db_1 | VALUES ($1, $2) RETURNING "id";
db_1 | 2019-08-27 15:39:27.620 UTC [1791] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-27 15:39:27.640 UTC [1791] LOG: incomplete startup packet
db_1 | 2019-08-27 15:39:27.820 UTC [1794] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-27 15:39:27.821 UTC [1794] LOG: incomplete startup packet
db_1 | 2019-08-27 15:39:27.824 UTC [1793] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-27 15:39:27.824 UTC [1793] LOG: incomplete startup packet
db_1 | 2019-08-28 17:19:32.961 UTC [3597] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-28 17:19:42.310 UTC [3598] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-28 17:19:43.213 UTC [3597] LOG: incomplete startup packet
db_1 | 2019-08-28 17:19:58.571 UTC [3598] LOG: incomplete startup packet
db_1 | 2019-08-28 17:22:19.573 UTC [3600] ERROR: duplicate key value violates unique constraint "service_application_service name_key"
db_1 | 2019-08-28 17:22:19.573 UTC [3600] DETAIL: Key (application, "service name")=(1, main) already exists.
db_1 | 2019-08-28 17:22:19.573 UTC [3600] STATEMENT: INSERT INTO "service" ("application", "service name")
db_1 | VALUES ($1, $2) RETURNING "id";
db_1 | 2019-08-29 16:39:48.082 UTC [5222] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-29 16:39:51.939 UTC [5222] LOG: incomplete startup packet
db_1 | 2019-08-29 16:40:52.855 UTC [1] LOG: could not fork new process for connection: Cannot allocate memory
db_1 | 2019-08-29 16:41:27.691 UTC [5224] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-29 16:41:49.363 UTC [5224] LOG: incomplete startup packet
db_1 | 2019-08-29 16:42:17.903 UTC [5225] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-29 16:42:17.943 UTC [5225] LOG: incomplete startup packet
db_1 | 2019-08-30 14:47:32.511 UTC [6764] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-30 14:48:39.390 UTC [6765] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-30 14:48:46.802 UTC [6765] LOG: incomplete startup packet
db_1 | 2019-08-30 14:48:46.796 UTC [1] LOG: could not fork new process for connection: Cannot allocate memory
db_1 | 2019-08-30 14:48:46.875 UTC [6767] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-30 14:48:46.878 UTC [6767] LOG: incomplete startup packet
db_1 | 2019-08-31 11:19:18.927 UTC [8203] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-31 11:19:31.635 UTC [8203] LOG: incomplete startup packet
db_1 | 2019-08-31 11:21:33.084 UTC [8206] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-31 11:21:33.087 UTC [8206] LOG: incomplete startup packet
db_1 | 2019-08-31 11:21:33.212 UTC [8207] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-31 11:21:33.212 UTC [8207] LOG: incomplete startup packet
db_1 | 2019-08-31 11:21:33.255 UTC [8208] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-08-31 11:21:33.255 UTC [8208] LOG: incomplete startup packet
db_1 | 2019-09-01 06:30:55.579 UTC [25] WARNING: worker took too long to start; canceled
db_1 | 2019-09-01 06:30:55.834 UTC [9543] WARNING: autovacuum worker started without a worker entry
db_1 | 2019-09-02 00:19:04.617 UTC [10789] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-09-02 00:19:12.338 UTC [10789] LOG: incomplete startup packet
db_1 | 2019-09-02 00:19:18.373 UTC [10791] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-09-02 00:19:18.390 UTC [10791] LOG: incomplete startup packet
db_1 | 2019-09-02 00:19:18.254 UTC [10790] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-09-02 00:19:18.790 UTC [10790] LOG: incomplete startup packet
db_1 | 2019-09-02 00:19:59.874 UTC [10793] LOG: could not receive data from client: Connection reset by peer
And it kept going with that warning until the 7th of September, then stopped. Nothing else until a manual restart today.
db_1 | 2019-09-07 15:06:06.663 UTC [20075] LOG: incomplete startup packet
db_1 | 2019-09-07 15:06:06.666 UTC [20061] LOG: incomplete startup packet
db_1 | 2019-09-07 15:06:06.667 UTC [20070] LOG: could not receive data from client: Connection reset by peer
db_1 | 2019-09-07 15:06:06.670 UTC [20070] LOG: incomplete startup packet
db_1 | 2019-09-08 16:47:36.119 UTC [1] LOG: received smart shutdown request
At around the same time, I can see the regular “ping” traffic to the server stopping.
The same errors have popped up for the database after the restart.
As for the CLI, I now get network timeout at: https://api.mybalena.local/login_
I see could not fork new process for connection: Cannot allocate memory
. Maybe I don’t have enough RAM on the server ? I can try adding more.
Thanks in advance for the help. I can provide any other needed info.
Tim