Closed alexislefebvre closed 3 years ago
In this issue it looks like it might be memory related: https://github.com/benoitc/gunicorn/issues/1663 Could you reduce you gunicorn worker to 1 in your config?
Thanks for your answer. The behaviour is the same with one worker. I have 8 GB of RAM.
@alexislefebvre you are not the only one with this bug... some others reported it through discord... let see if @derneuere can do some magic here to solve it ;)
The CPU of my server is “Intel(R) Celeron(R) CPU 1037U @ 1.80GHz”. It doesn't support AVX.
With the last update, with this fix:
docker-compose logs --tail 20 --follow backend
Attaching to librephotos-ayu_backend_1
backend_1 | statd: unrecognized service
backend_1 | /entrypoint.sh: line 10: 48 Illegal instruction (core dumped) python manage.py clear_cache
backend_1 | Running backend server...
backend_1 | production backend starting
backend_1 | [2021-04-15 18:28:28 +0000] [63] [INFO] Starting gunicorn 20.1.0
backend_1 | [2021-04-15 18:28:28 +0000] [63] [INFO] Listening at: http://172.23.0.4:8001 (63)
backend_1 | [2021-04-15 18:28:28 +0000] [63] [INFO] Using worker: gevent
backend_1 | [2021-04-15 18:28:28 +0000] [67] [INFO] Booting worker with pid: 67
backend_1 | [2021-04-15 18:28:39 +0000] [63] [WARNING] Worker with pid 67 was terminated due to signal 4
backend_1 | [2021-04-15 18:28:39 +0000] [76] [INFO] Booting worker with pid: 76
backend_1 | [2021-04-15 18:28:46 +0000] [63] [WARNING] Worker with pid 76 was terminated due to signal 4
backend_1 | [2021-04-15 18:28:46 +0000] [81] [INFO] Booting worker with pid: 81
backend_1 | [2021-04-15 18:28:54 +0000] [63] [WARNING] Worker with pid 81 was terminated due to signal 4
backend_1 | [2021-04-15 18:28:54 +0000] [86] [INFO] Booting worker with pid: 86
backend_1 | [2021-04-15 18:29:01 +0000] [63] [WARNING] Worker with pid 86 was terminated due to signal 4
backend_1 | [2021-04-15 18:29:01 +0000] [91] [INFO] Booting worker with pid: 91
And so on.
The last update did not work for me (same error as before). I've rebuilt the backend docker image on the server (with a CPU without the AVX support) and I can confirm that it works! :tada:
@deliantwo Could you upload your backend image to dockerhub? Just to check if it resolves @alexislefebvre problems too.
eager to test too! or tell me how to rebuild the backend docker image
@darrepac you can try this:
# 2. Build images on your own machine:
# build cmd: COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build
# run cmd: docker-compose up -d
I must be missing something:
$ export COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 ; docker-compose build
db uses an image, skipping
backend uses an image, skipping
frontend uses an image, skipping
proxy uses an image, skipping
redis uses an image, skipping
WARNING: Native build is an experimental feature and could change at any time
$ docker-compose -v
docker-compose version 1.25.0, build 0a186604
The docker-compose build
command can't work because the docker-compose.yml
file use a image
node instead of build
with context
.
@deliantwo Could you upload your backend image to dockerhub? Just to check if it resolves @alexislefebvre problems too.
Sure, no problem. I'm pushing it right now but I'm on a slow network and it's 4.32GB... have faith :smile: When the push ends you will find it here
Sorry for the noob question but what do I have to put in yml file to use your image instead of the current one?
@darrepac Just change the backend image repository. I've pushed the same tag dev, so no additional change is needed
@@ -39,7 +39,7 @@
- backend
backend:
- image: reallibrephotos/librephotos:${tag}
+ image: delian2/librephotos:${tag}
restart: always
volumes:
- ${myPhotos}:/data
Thanks a lot @deliantwo, it works! :tada:
All right, I will write a tutorial on how to build the backend image yourself for users who use CPUs without AVX support.
@deliantwo well done, solve the problem on my side too
Wrote docs about it: https://docs.librephotos.com/1/old_processors/
@darrepac Just change the backend image repository. I've pushed the same tag dev, so no additional change is needed
@@ -39,7 +39,7 @@ - backend backend: - image: reallibrephotos/librephotos:${tag} + image: delian2/librephotos:${tag} restart: always volumes: - ${myPhotos}:/data
@deliantwo do you plan to maintain the image or not?
thx
🐛 Bug Report
What Operating system and version is LibrePhotos running on:
Debian, last Docker release.
What architecture is LibrePhotos running on:
x64
How is LibrePhotos installed:
Docker
If running via Docker or Kubernets please list version including docker-compose:
Click to expand!
```yaml # DO NOT EDIT # The .env file has everything you need to edit. # Run options: # 1. Use prebuilt images (preferred method): # run cmd: docker-compose up -d # 2. Build images on your own machine: # build cmd: COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build # run cmd: docker-compose up -d version: '3.3' services: proxy: image: reallibrephotos/librephotos-proxy:${tag} restart: unless-stopped volumes: - ${myPhotos}:/data - ${proMedia}:/protected_media ports: - ${httpPort}:80 depends_on: - backend - frontend db: image: postgres:13 restart: unless-stopped environment: - POSTGRES_USER=${dbUser} - POSTGRES_PASSWORD=${dbPass} - POSTGRES_DB=${dbName} volumes: - ${dbLocation}:/var/lib/postgresql/data command: postgres -c fsync=off -c synchronous_commit=off -c full_page_writes=off -c random_page_cost=1.0 frontend: image: reallibrephotos/librephotos-frontend:${tag} restart: always depends_on: - backend backend: image: reallibrephotos/librephotos:${tag} restart: unless-stopped volumes: - ${myPhotos}:/data:ro - ${proMedia}:/protected_media - ${logLocation}:/logs - ${cachedir}:/root/.cache environment: - SECRET_KEY=${shhhhKey} - BACKEND_HOST=backend - ADMIN_EMAIL=${adminEmail} - ADMIN_USERNAME=${userName} - ADMIN_PASSWORD=${userPass} - DB_BACKEND=postgresql - DB_NAME=${dbName} - DB_USER=${dbUser} - DB_PASS=${dbPass} - DB_HOST=db - DB_PORT=5432 - REDIS_HOST=redis - REDIS_PORT=6379 - MAPBOX_API_KEY=${mapApiKey} - TIME_ZONE=${timeZone} - WEB_CONCURRENCY=${gunniWorkers} - SKIP_PATTERNS=${skipPatterns} - DEBUG=0 # Wait for Postgres depends_on: - db redis: image: redis:6 restart: unless-stopped ```The difference with default conf is
- ${myPhotos}:/data:ro
, my filed are mounted on a read-only mount point.Are you running LibrePhotos on a virtual machine if so please list:
How is you picture library mounted on the host (or in the virtual machine):
Local file system (ext4)
Description of issue:
My CPU has too much usage, I have to stop LibrePhotos.
How can we reproduce it:
I don't know.
Additional Information: