alexjustesen / speedtest-tracker

Speedtest Tracker is a self-hosted internet performance tracking application that runs speedtest checks against Ookla's Speedtest service.
https://speedtest-tracker.dev/
MIT License
2.71k stars 100 forks source link

Specific CRON can cause server 500 error #1548

Closed nswa203 closed 3 months ago

nswa203 commented 3 months ago

Describe the bug Using cron of "0 11/12 *" causes persistent "500 Oops Server Error" attempting to log in .

To Reproduce change environment variable to SPEEDTEST_SCHEDULE="0 11/12 *" rebuild docker container & start attempt to login

Expected behavior Expect to see pretty login screen user/password

Environment (please complete the following information): Linux 6.6.34-current-rockchip64 Open Media Vault 7 Docker container using following compose stack

version: '3.3' services: speedtest-tracker: image: lscr.io/linuxserver/speedtest-tracker:latest container_name: SpeedtestTracker environment:

Screenshots

Logs Container's console log looks clean ... no errors [migrations] started [migrations] 01-nginx-site-confs-default: skipped [migrations] done ─────────────────────────────────────── ██╗ ███████╗██╗ ██████╗ ██║ ██╔════╝██║██╔═══██╗ ██║ ███████╗██║██║ ██║ ██║ ╚════██║██║██║ ██║ ███████╗███████║██║╚██████╔╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ Brought to you by linuxserver.io ─────────────────────────────────────── To support the app dev(s) visit: speedtest-tracker: https://github.com/sponsors/alexjustesen To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 1000 User GID: 100 ─────────────────────────────────────── Linuxserver.io version: v0.20.6-ls30 Build-date: 2024-06-15T21:23:04+00:00 ───────────────────────────────────────

using keys found in /config/keys Waiting for DB to be available [custom-init] No custom files found, skipping... [ls.io-init] done.

Additional context Reverting to a cron of "0 11 *" and all works fine again.

svenvg93 commented 3 months ago

I think its because 0 11/12 * * * is not a standaard cron job, Can you try to see if it works when changing it to 0 11,23 * * * This should run at 11:00 and 23:00

nswa203 commented 3 months ago

mmmm I got the cron off one of those cron build websites - you just can't trust the internet! Your suggestion works so I'm now running with SPEEDTEST_SCHEDULE="0 11,23 *" and it is fine.

Incidentaly I'm running it twice every 24 hours as running it much more frequently and my local Ookla servers start to throttle the response which sort of makes a nonsense of providing a speed test service. After about 10 iterations at 30 minute intervals the reported speed dropped from 940 Mbps to 83 Mbps. This throttling did not happen if I used a web site to run Ookla specifying the same server ID ... so I'm guessing its only hitting the API.

Thx for the quick response.

svenvg93 commented 3 months ago

mmmm I got the cron off one of those cron build websites - you just can't trust the internet! Your suggestion works so I'm now running with SPEEDTEST_SCHEDULE="0 11,23 *" and it is fine.

Good happy to hear it's solved. Cron isn't really standard so there are some variations on it. Im always using this one, as it will tell if its standard cron expression or not https://crontab.guru

Incidentaly I'm running it twice every 24 hours as running it much more frequently and my local Ookla servers start to throttle the response which sort of makes a nonsense of providing a speed test service. After about 10 iterations at 30 minute intervals the reported speed dropped from 940 Mbps to 83 Mbps. This throttling did not happen if I used a web site to run Ookla specifying the same server ID ... so I'm guessing its only hitting the API.

Im running my test every second hour (2,4,6,8,10 etc). Which might give you a more insights without being throggeld

If the problem with the cron is solved, please close the issue :)