Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysreptor stops working from time to time with: Server Error (500) #372

Open
wwwiesel opened this issue Dec 27, 2024 · 2 comments
Open

sysreptor stops working from time to time with: Server Error (500) #372

wwwiesel opened this issue Dec 27, 2024 · 2 comments

Comments

@wwwiesel
Copy link

wwwiesel commented Dec 27, 2024

Hello,

my fresh installed sysreptor instance stops working after some time. If i open my browser and wanted to connect to sysreptor it gives me an "Server Error (500)"

root@npsis1:~# docker ps -a
CONTAINER ID   IMAGE                         COMMAND                  CREATED      STATUS                  PORTS                      NAMES
a619bc6057b8   syslifters/sysreptor:latest   "/bin/bash /app/api/…"   2 days ago   Up 2 days (unhealthy)   127.0.0.1:8000->8000/tcp   sysreptor-app
97910087c825   postgres:14                   "docker-entrypoint.s…"   3 days ago   Up 3 days (healthy)     5432/tcp                   sysreptor-db
5822fae3f7e6   bitnami/redis:7.2             "/opt/bitnami/script…"   3 days ago   Up 3 days               6379/tcp                   sysreptor-redis
234786fa2ef4   caddy:latest                  "caddy run --config …"   3 days ago   Up 2 days                                          sysreptor-caddy
root@npsis1:~# docker exec -t -i a619bc6057b8 /bin/bash
user@a619bc6057b8:/app/api$ ls
NOTICE  download_sources.sh  frontend  generate_notice.sh  manage.py  poetry.lock  pyproject.toml  pytest.ini  reportcreator_api  start.sh  static  sysreptor_plugins
user@a619bc6057b8:/app/api$ ps auxf
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
user       43959  0.2  0.5  23784 10984 ?        Ss   08:13   0:00 curl -f http://localhost:8000/api/public/utils/healthcheck/
user       43933  0.0  0.1   4712  3840 pts/0    Ss   08:12   0:00 /bin/bash
user       43967  0.0  0.1   7212  3988 pts/0    R+   08:13   0:00  \_ ps auxf
user           1  0.0  0.0   1048     0 ?        Ss   Dec24   0:08 /sbin/docker-init -- /bin/bash /app/api/start.sh
user           8  0.0  0.1   4448  2120 ?        S    Dec24   0:00 /bin/bash /app/api/start.sh
user          41  0.0  1.0  42152 21840 ?        S    Dec24   0:44  \_ /usr/local/bin/python3.12 /usr/local/bin/gunicorn --bind=:8000 --worker-class=uvicorn.workers.UvicornWorker --workers=4 --max-requests=500 --max-requests-jitter=100 --graceful-timeout=300 reportcreator_api.conf.asgi:application
user          42  0.1 11.3 1163944 228856 ?      Sl   Dec24   5:06      \_ /usr/local/bin/python3.12 /usr/local/bin/gunicorn --bind=:8000 --worker-class=uvicorn.workers.UvicornWorker --workers=4 --max-requests=500 --max-requests-jitter=100 --graceful-timeout=300 reportcreator_api.conf.asgi:application
user          43  0.1  9.8 1135264 198384 ?      Sl   Dec24   4:58      \_ /usr/local/bin/python3.12 /usr/local/bin/gunicorn --bind=:8000 --worker-class=uvicorn.workers.UvicornWorker --workers=4 --max-requests=500 --max-requests-jitter=100 --graceful-timeout=300 reportcreator_api.conf.asgi:application
user          44  0.1 14.9 1372104 301344 ?      Sl   Dec24   5:26      \_ /usr/local/bin/python3.12 /usr/local/bin/gunicorn --bind=:8000 --worker-class=uvicorn.workers.UvicornWorker --workers=4 --max-requests=500 --max-requests-jitter=100 --graceful-timeout=300 reportcreator_api.conf.asgi:application
user          45  0.1  8.8 1051300 177960 ?      Sl   Dec24   4:50      \_ /usr/local/bin/python3.12 /usr/local/bin/gunicorn --bind=:8000 --worker-class=uvicorn.workers.UvicornWorker --workers=4 --max-requests=500 --max-requests-jitter=100 --graceful-timeout=300 reportcreator_api.conf.asgi:application

Healthceck does not work for me

user@a619bc6057b8:/app/api$ curl -f http://localhost:8000/api/public/utils/healthcheck/
^[[A

I modifies the start.sh to write down errorlogs... will be added soon.

@wwwiesel
Copy link
Author

Just died again... without any logs

user@a619bc6057b8:/app/api$ curl -f http://localhost:8000/api/public/utils/healthcheck/


^C
user@a619bc6057b8:/app/api$ ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
user           1  0.0  0.0   1048     0 ?        Ss   09:22   0:00 /sbin/docker-init -- /bin/bash /app/api/start.sh
user           8  0.0  0.1   4448  2724 ?        S    09:22   0:00 /bin/bash /app/api/start.sh
user          30  0.0  0.1   4824  3136 pts/0    Ss   09:22   0:00 /bin/bash
user          50  0.0  1.1  42164 23292 ?        S    09:22   0:01 /usr/local/bin/python3.12 /usr/local/bin/gunicorn --bind=:8000 --worker-class=uvicorn.workers.UvicornWorker --workers=4 --max-requests=500 --max-requests-jitter=100 --error-logfile error.log --graceful-timeout=300 reportcreator_api.conf.asgi:application
user          51  0.3  8.9 900892 180396 ?       Sl   09:22   0:16 /usr/local/bin/python3.12 /usr/local/bin/gunicorn --bind=:8000 --worker-class=uvicorn.workers.UvicornWorker --workers=4 --max-requests=500 --max-requests-jitter=100 --error-logfile error.log --graceful-timeout=300 reportcreator_api.conf.asgi:application
user          52  0.3  8.4 683620 171212 ?       Sl   09:22   0:18 /usr/local/bin/python3.12 /usr/local/bin/gunicorn --bind=:8000 --worker-class=uvicorn.workers.UvicornWorker --workers=4 --max-requests=500 --max-requests-jitter=100 --error-logfile error.log --graceful-timeout=300 reportcreator_api.conf.asgi:application
user          53  0.3  9.1 840268 184040 ?       Sl   09:22   0:19 /usr/local/bin/python3.12 /usr/local/bin/gunicorn --bind=:8000 --worker-class=uvicorn.workers.UvicornWorker --workers=4 --max-requests=500 --max-requests-jitter=100 --error-logfile error.log --graceful-timeout=300 reportcreator_api.conf.asgi:application
user          54  0.5  8.9 1330868 181360 ?      Sl   09:22   0:27 /usr/local/bin/python3.12 /usr/local/bin/gunicorn --bind=:8000 --worker-class=uvicorn.workers.UvicornWorker --workers=4 --max-requests=500 --max-requests-jitter=100 --error-logfile error.log --graceful-timeout=300 reportcreator_api.conf.asgi:application
user        6115  0.0  0.1   7212  3924 pts/0    R+   10:45   0:00 ps aux
user@a619bc6057b8:/app/api$
user@a619bc6057b8:/app/api$ cat error.log
[2024-12-27 09:22:52 +0000] [50] [INFO] Starting gunicorn 23.0.0
[2024-12-27 09:22:52 +0000] [50] [INFO] Listening at: http://0.0.0.0:8000 (50)
[2024-12-27 09:22:52 +0000] [50] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2024-12-27 09:22:52 +0000] [51] [INFO] Booting worker with pid: 51
[2024-12-27 09:22:52 +0000] [52] [INFO] Booting worker with pid: 52
[2024-12-27 09:22:52 +0000] [53] [INFO] Booting worker with pid: 53
[2024-12-27 09:22:52 +0000] [54] [INFO] Booting worker with pid: 54

@aronmolnar
Copy link
Contributor

Hi,
You should get logs using docker logs sysreptor-app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants