Repository navigation
Closed
Description
I followed the upgrade process to go from Inventree 0.8.4 to 0.9.0 today:
docker-compose run inventree-server invoke update
After the upgrade, I couldn't reach the login page anymore. Checked the logs, it looks like there are WORKER TIMEOUT and Worker was terminated due to signal 9 errors
I believe terminated due to signal 9 usually means that there are not enough respources available, but that's not the case on my system. 50% of 8GB RAM free, and CPU is hovering around 30%. CPU is spiking to 98% when running docker-compose up but comes back to 30% shortly after.
Went back to 0.8.4 and everything is running smoothly.
Any suggestions to get 0.9.0 to work?
Logs:
ash-4.4# docker-compose up
Creating network "inventree_default" with the default driver
Creating inventree-db ... done
Creating inventree-server ... done
Creating inventree-worker ... done
Creating inventree-proxy ... done
Attaching to inventree-db, inventree-server, inventree-worker, inventree-proxy
inventree-db |
inventree-db | PostgreSQL Database directory appears to contain a database; Skipping initialization
inventree-db |
inventree-db | 2022-12-20 16:05:23.844 UTC [1] LOG: starting PostgreSQL 13.9 (Debian 13.9-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
inventree-db | 2022-12-20 16:05:23.850 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
inventree-db | 2022-12-20 16:05:23.851 UTC [1] LOG: listening on IPv6 address "::", port 5432
inventree-db | 2022-12-20 16:05:24.189 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
inventree-db | 2022-12-20 16:05:24.940 UTC [25] LOG: database system was shut down at 2022-12-20 16:04:42 UTC
inventree-db | 2022-12-20 16:05:25.354 UTC [1] LOG: database system is ready to accept connections
inventree-proxy | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
inventree-proxy | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
inventree-proxy | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
inventree-proxy | 10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?)
inventree-proxy | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
inventree-proxy | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
inventree-proxy | /docker-entrypoint.sh: Configuration complete; ready for start up
inventree-worker | Loading config file : /home/inventree/data/config.yaml
inventree-server | Loading config file : /home/inventree/data/config.yaml
inventree-server | InvenTree translation coverage: 22%
inventree-proxy | 2022/12/20 16:05:50 [notice] 1#1: using the "epoll" event method
inventree-proxy | 2022/12/20 16:05:50 [notice] 1#1: nginx/1.22.1
inventree-proxy | 2022/12/20 16:05:50 [notice] 1#1: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
inventree-proxy | 2022/12/20 16:05:50 [notice] 1#1: OS: Linux 4.4.180+
inventree-proxy | 2022/12/20 16:05:50 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
inventree-proxy | 2022/12/20 16:05:50 [notice] 1#1: start worker processes
inventree-proxy | 2022/12/20 16:05:50 [notice] 1#1: start worker process 22
inventree-proxy | 2022/12/20 16:05:50 [notice] 1#1: start worker process 23
inventree-worker | InvenTree translation coverage: 22%
inventree-server | [2022-12-20 16:06:15 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:18)
inventree-server | [2022-12-20 16:06:15 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:19)
inventree-server | [2022-12-20 16:06:15 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:20)
inventree-server | [2022-12-20 16:06:15 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:21)
inventree-server | [2022-12-20 16:06:16 +0000] [17] [WARNING] Worker with pid 21 was terminated due to signal 9
inventree-server | [2022-12-20 16:06:16 +0000] [17] [WARNING] Worker with pid 19 was terminated due to signal 9
inventree-server | [2022-12-20 16:06:16 +0000] [17] [WARNING] Worker with pid 20 was terminated due to signal 9
inventree-worker | Waiting for database...
inventree-worker | Database connection sucessful!
inventree-server | [2022-12-20 16:06:46 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:22)
inventree-server | [2022-12-20 16:06:46 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:23)
inventree-server | [2022-12-20 16:06:46 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:24)
inventree-server | [2022-12-20 16:06:46 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:25)
inventree-server | [2022-12-20 16:06:47 +0000] [17] [WARNING] Worker with pid 24 was terminated due to signal 9
inventree-server | [2022-12-20 16:06:47 +0000] [17] [WARNING] Worker with pid 22 was terminated due to signal 9
inventree-server | [2022-12-20 16:06:47 +0000] [17] [WARNING] Worker with pid 23 was terminated due to signal 9
inventree-server | [2022-12-20 16:06:47 +0000] [17] [WARNING] Worker with pid 25 was terminated due to signal 9
inventree-worker | WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
inventree-worker | fatal: not a git repository (or any of the parent directories): .git
inventree-worker | fatal: not a git repository (or any of the parent directories): .git
inventree-worker | fatal: not a git repository (or any of the parent directories): .git
inventree-server | [2022-12-20 16:07:17 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:126)
inventree-server | [2022-12-20 16:07:17 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:128)
inventree-server | [2022-12-20 16:07:17 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:129)
inventree-server | [2022-12-20 16:07:17 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:130)
inventree-server | [2022-12-20 16:07:18 +0000] [17] [WARNING] Worker with pid 130 was terminated due to signal 9
inventree-server | [2022-12-20 16:07:18 +0000] [17] [WARNING] Worker with pid 128 was terminated due to signal 9
inventree-server | [2022-12-20 16:07:18 +0000] [17] [WARNING] Worker with pid 129 was terminated due to signal 9
inventree-server | [2022-12-20 16:07:18 +0000] [17] [WARNING] Worker with pid 126 was terminated due to signal 9
inventree-worker | 16:07:20 [Q] INFO Enqueued 39493
inventree-worker | 16:07:24 [Q] INFO Q Cluster lithium-stairway-sixteen-summer starting.
inventree-worker | 16:07:24 [Q] INFO Process-1:1 ready for work at 78
inventree-worker | 16:07:24 [Q] INFO Process-1:2 ready for work at 79
inventree-worker | 16:07:24 [Q] INFO Process-1:3 ready for work at 80
inventree-worker | 16:07:24 [Q] INFO Process-1:4 ready for work at 81
inventree-worker | 16:07:24 [Q] INFO Process-1:5 monitoring at 82
inventree-worker | 16:07:24 [Q] INFO Process-1 guarding cluster lithium-stairway-sixteen-summer
inventree-worker | 16:07:24 [Q] INFO Process-1:6 pushing tasks at 83
inventree-worker | 16:07:24 [Q] INFO Q Cluster lithium-stairway-sixteen-summer running.
inventree-worker | 16:07:25 [Q] INFO Process-1:1 processing [minnesota-wisconsin-helium-london]
inventree-worker | 16:07:25 [Q] INFO Process-1:2 processing [south-cup-six-nebraska]
inventree-worker | 16:07:28 [Q] INFO Processed [minnesota-wisconsin-helium-london]
inventree-worker | 16:07:29 [Q] INFO Processed [south-cup-six-nebraska]
inventree-server | [2022-12-20 16:07:49 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:235)
inventree-server | [2022-12-20 16:07:49 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:236)
inventree-server | [2022-12-20 16:07:49 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:237)
inventree-server | [2022-12-20 16:07:49 +0000] [17] [CRITICAL] WORKER TIMEOUT (pid:238)
inventree-server | [2022-12-20 16:07:50 +0000] [17] [WARNING] Worker with pid 235 was terminated due to signal 9
inventree-server | [2022-12-20 16:07:50 +0000] [17] [WARNING] Worker with pid 236 was terminated due to signal 9
inventree-server | [2022-12-20 16:07:50 +0000] [17] [WARNING] Worker with pid 237 was terminated due to signal 9
inventree-server | [2022-12-20 16:07:50 +0000] [17] [WARNING] Worker with pid 238 was terminated due to signal 9
Metadata
Metadata
Assignees
Labels
No labels
Activity
matmair commentedon Dec 20, 2022
@BrentVerhaegen please use the bug template to report issues, we need the info asked there for efficient debugging.
MatjazSi commentedon Dec 23, 2022
Hi,
I have the same problem.
@BrentVerhaegen , can you please tell me how you manage to downgrade to the older version.? I tried to add INVENTREE_TAG=0.8.4 to prod-conf.env fil, but that doesn't download old files from GitHub...
wolflu05 commentedon Dec 23, 2022
I guess you already run your v0.9.0 database migrations. So either you have an backup or you have to stay at that version and wait for a fix. It could be that you already have those tags downloaded, so if you do
docker-compose down && docker-compose up -dit will use the existing ones.MatjazSi commentedon Dec 24, 2022
Hi @wolflu05 ,
Yes, this is exactly what happened. I upgraded to 0.9.0 and migrated DB, so now it doesn't work on 0.8.4. I, fortunately, backed up DB before the upgrade, but now I am having a hard time restoring it. I tried
invoke import-records -c -f data.jsonas described here, but I get a response from the server:Can't find any collection named 'tasks'!. Can you please help me to resolve this issue, I don't want to wait for the bug in 0.9.0 to be fixed.SchrodingersGat commentedon Dec 24, 2022
@BrentVerhaegen perhaps the docker container itself is running into resource constraint issues?
https://docs.docker.com/config/containers/resource_constraints/
For reference, the inventree demo server is running from the production docker-compose script.
SchrodingersGat commentedon Dec 24, 2022
@siworks if you're running within a docker container, you'll need to call the function as below:
MatjazSi commentedon Dec 24, 2022
@SchrodingersGat thanx, command now works, but I get this error:
CommandError: Database inventree couldn't be flushed. I tried to start the inventree-db container and stoping it, even rebooting the system, but I always get this error...MatjazSi commentedon Dec 24, 2022
Hi all,
@SchrodingersGat it seems you were right in the previous post, the issue that 0.9.0 won't run was resource constraints. I am running Inventree on Digital Ocean, and until now I was using 1 virtual CPU and 2 GB of RAM. In order to ruin 0.9.0 tag of Inventree I updated my computer to 2 virtual CPUs and now it works flawlessly!
matmair commentedon Dec 24, 2022
@siworks how many workers are you running? My personal deployment runs on DO with 1 vCPU and 1 GB RAM without problems on
0.9.0.MatjazSi commentedon Dec 24, 2022
@matmair How do I check how many workers are running? I am using default setup with docker.
matmair commentedon Dec 31, 2022
@siworks if you have not set anything it uses 4. There would be an environment variable to change that.
SchrodingersGat commentedon Jan 26, 2023
@BrentVerhaegen did you manage to get this working?
matmair commentedon Feb 13, 2023
Closing due to inactivity. Please reopen if the problem is still persisting.
We released a new stable with improvements for the backup task since this was opened - that should solve some or all of the mentioned points.