Repository: alexjustesen/speedtest-tracker

Issue #881: Log ERROR - absolute Download Threshold Failed 
Created: 2023-10-30T18:09:22Z
Using lasted version in Docker in Unraid
Threshholds:
DL=400
UP=5
Ping=30
it seems only in log error ,but wasnt befor i think :
production.ERROR: absoluteDownloadThresholdFailed(): Argument #2 ($download) must be of type float, null given, called in /var/www/html/app/Listeners/Threshold/AbsoluteListener.php on line 72 {"exception":"[object] (TypeError(code: 0): absoluteDownloadThresholdFailed(): Argument #2 ($download) must be of type float, null given, called in /var/www/html/app/Listeners/Threshold/AbsoluteListener.php on line 72 at /var/www/html/app/helpers.php:37)

Duplicate issue #995: Losing network connection on server and speedtest fails
Created: 2023-12-20T10:06:28Z
Describe the bug
Every time a speedtest runs (both manual and scheduled) my server seemingly loses network connection for a couple of seconds. I haven't been able to confirm if I lose network connection altogether, but I believe that I do, because I lose connection to both my Minecraft server and my VSCode remote SSH session at the same time.
This has been an issue for a while, but I'm unsure when it first happened. It could've started an update, but that I can't confirm.
The data logs in the web-UI mention using the path /root/.config/ookla/speedtest-cli.json, but I checked the /root path in the container, and there wasn't any files there.

docker-compose.yml
# SPEEDTEST-TRACKER
  speedtest-tracker:
    container_name: speedtest-tracker
    environment:
      - PUID=$PUID
      - PGID=$PGID
      - DB_CONNECTION=mysql
      - DB_HOST=mariadb
      - DB_PORT=3306
      - DB_DATABASE=speedtest_tracker
      - DB_USERNAME=speedtest
      - DB_PASSWORD=$SPEEDTEST_DB_PASSWORD
      - MAIL_HOST=$MAIL_HOST
      - MAIL_PORT=$MAIL_PORT
      - MAIL_USERNAME=$MAIL_USERNAME
      - MAIL_PASSWORD=$SPEEDTEST_MAIL_PASSWORD
      - MAIL_FROM_ADDRESS=$MAIL_USERNAME
    volumes:
      - $DATA/speedtest-tracker:/config
    labels:
      - traefik.enable=true
      - traefik.http.services.speedtest-tracker.loadbalancer.server.port=443
      - traefik.http.services.speedtest-tracker.loadbalancer.server.scheme=https
      - traefik.http.routers.speedtest-tracker.rule=Host(`speedtest.$DOMAIN`)
    image: ghcr.io/alexjustesen/speedtest-tracker:latest
    restart: unless-stopped
    depends_on:
      - mariadb
    networks:
      - default-network

To Reproduce
Steps to reproduce the behavior:
Just use the docker compose, and run a speedtest or wait for the scheduled one.
Environment (please complete the following information):

OS: Ubuntu
Architecture: amd64
Browser: N/A
App version: 0.14.0

Screenshots

Logs

  Docker container logs
2023-12-20T09:18:16.920139305Z [2023-12-20 09:18:16] production.ERROR: absoluteDownloadThresholdFailed(): Argument #2 ($download) must be of type float, null given, called in /var/www/html/app/Listeners/Threshold/AbsoluteListener.php on line 117 {"exception":"[object] (TypeError(code: 0): absoluteDownloadThresholdFailed(): Argument #2 ($download) must be of type float, null given, called in /var/www/html/app/Listeners/Threshold/AbsoluteListener.php on line 117 at /var/www/html/app/helpers.php:37)
2023-12-20T09:18:16.920177731Z [stacktrace]
2023-12-20T09:18:16.920182909Z #0 /var/www/html/app/Listeners/Threshold/AbsoluteListener.php(117): absoluteDownloadThresholdFailed()
2023-12-20T09:18:16.920186384Z #1 /var/www/html/app/Listeners/Threshold/AbsoluteListener.php(56): App\\Listeners\\Threshold\\AbsoluteListener->mailChannel()
2023-12-20T09:18:16.920190152Z #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php(107): App\\Listeners\\Threshold\\AbsoluteListener->handle()
2023-12-20T09:18:16.920193511Z #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Events\\CallQueuedListener->handle()
2023-12-20T09:18:16.920197124Z #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
2023-12-20T09:18:16.920200460Z #5 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
2023-12-20T09:18:16.920203733Z #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
2023-12-20T09:18:16.920206908Z #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
2023-12-20T09:18:16.920210101Z #8 /var/www/html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call()
2023-12-20T09:18:16.920221682Z #9 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}()
2023-12-20T09:18:16.920225342Z #10 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
2023-12-20T09:18:16.920229756Z #11 /var/www/html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then()
2023-12-20T09:18:16.920233016Z #12 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\\Bus\\Dispatcher->dispatchNow()
2023-12-20T09:18:16.920236330Z #13 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}()
2023-12-20T09:18:16.920239748Z #14 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
2023-12-20T09:18:16.920243185Z #15 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(122): Illuminate\\Pipeline\\Pipeline->then()
2023-12-20T09:18:16.920246380Z #16 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(70): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware()
2023-12-20T09:18:16.920254628Z #17 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\\Queue\\CallQueuedHandler->call()
2023-12-20T09:18:16.920258130Z #18 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(439): Illuminate\\Queue\\Jobs\\Job->fire()
2023-12-20T09:18:16.920261406Z #19 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(389): Illuminate\\Queue\\Worker->process()
2023-12-20T09:18:16.920264635Z #20 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(176): Illuminate\\Queue\\Worker->runJob()
2023-12-20T09:18:16.920267814Z #21 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(137): Illuminate\\Queue\\Worker->daemon()
2023-12-20T09:18:16.920270955Z #22 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(120): Illuminate\\Queue\\Console\\WorkCommand->runWorker()
2023-12-20T09:18:16.920274276Z #23 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
2023-12-20T09:18:16.920277495Z #24 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
2023-12-20T09:18:16.920280869Z #25 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
2023-12-20T09:18:16.920284379Z #26 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
2023-12-20T09:18:16.920287656Z #27 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
2023-12-20T09:18:16.920290872Z #28 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call()
2023-12-20T09:18:16.920294048Z #29 /var/www/html/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute()
2023-12-20T09:18:16.920297235Z #30 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run()
2023-12-20T09:18:16.920300528Z #31 /var/www/html/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run()
2023-12-20T09:18:16.920303663Z #32 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand()
2023-12-20T09:18:16.920306994Z #33 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun()
2023-12-20T09:18:16.920310182Z #34 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run()
2023-12-20T09:18:16.920313384Z #35 /var/www/html/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
2023-12-20T09:18:16.920316606Z #36 {main}
2023-12-20T09:18:16.920319510Z "}

Closing comment (2023-12-20T16:16:41Z): So production.ERROR: absoluteDownloadThresholdFailed() is related to #881, currently there's a bug where it tries to assess sending a notification when there is no result.
It's interesting how your network is dropping connection when a speedtest is run... Can you try the following steps and let me know the outcome? Also looking for logs that don't reference the download threshold from above.

Open the container's terminal to run commands
Run speedtest --accept-license, this will trigger the Speedtest CLI
This should run in the terminal with download and upload outputs