52408bc5a91df17bd4bc1bdf42b4db26b165fb98
Root cause was WORKER TIMEOUT, not OOM: - Gunicorn sends SIGABRT to workers that exceed 60s timeout - SIGABRT handler calls sys.exit(1) raising SystemExit(BaseException) - except Exception does NOT catch SystemExit, so the worker crashes Two fixes: 1. except BaseException — catches SystemExit so the worker survives and gracefully skips the image (returns None) instead of dying 2. Image.BILINEAR instead of LANCZOS — orders of magnitude faster for large images, ensures processing completes well within 60s 3. Reduce max_width 1600->800, megapixel limit 20->8 MP, optimize=True removed (these reduce processing time further) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Frontend + Backend + Database + Deployment
Deploy na serveru
Nakon što je gitea webhook i testirana skripta za automatsko povlačenje promjena iz repozitorija
cd /opt/erp/app
git fetch origin
git reset --hard origin/main ili git pull --ff-only origin main
# rebuild backend + worker + beat + frontend
docker compose -f docker-compose.yml -f docker-compose.prod.yml build backend worker beat frontend
# digni servise s novim image-ima
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --force-recreate backend worker beat frontend
# OBAVEZNO migracije (scheduled_date)
docker compose -f docker-compose.yml -f docker-compose.prod.yml exec backend python manage.py migrate
# provjera
curl -i https://api-004.captain.mitteworkspace.cloud/api/health/
Description
Languages
Python
51%
JavaScript
47.1%
TypeScript
0.8%
Astro
0.6%
CSS
0.3%