Page 1 of 1

[Solved]Timeout timeout timeout.... need help!

Posted: Friday 19 November 2021 13:48
by darrepac
Hello,

I am suffering from timeout error regularly. I need to press 2 or 3 times F5 in order to make Dashticz work (which is not easy on touchscreen, is there a dashticz button for that?)...but it eventually works so it is difficult to debug!
My setup:
raspberry pi with domoticz on it (192.168.0.19:9090) connected to my lan with ethernet
raspberry pi 3B with dashticz on it (and touchscreen with chromium) (192.168.0.61:8082) connected to my lan with internal wifi

What I tested/did:
- increased timeout in apache2.conf (Timeout 600)=> no effect
- test from several other places 192.168.0.61:8082 and other browsers (firefox, edge) => same effect (many timeout before succeed)
- try during 2 hours to ping every minute from dashticz server to domoticz server, to check if connection was not dropping => it doesn't drop. Yet I have deactivated wifi power saving into dashticz server

And so, I have regularly:
-

Code: Select all

Failed to load resource: the server responded with a status of 408 (Request Timeout)        :8082/lang/fr_FR.json?v=1637315997952:1

Code: Select all

Failed to load resource: the server responded with a status of 408 (Request Timeout) :8082/custom/CONFIG.js?_=1637320094633:1 

Code: Select all

bundle.js?t=18:309 GET http://192.168.0.61:8082/js/settings.js?_=1637316453502 408 (Request Timeout)
(or other ressource, it depends)
- more brutal:

Code: Select all

Request Timeout
Server timeout waiting for the HTTP request from the client.

Apache/2.4.48 (Debian) Server at 172.17.0.2 Port 80 
then after 2-3 refresh (F5), it works for a while...but few hours laters, timeout again

Re: Timeout timeout timeout.... need help!

Posted: Friday 19 November 2021 14:26
by Lokonli
darrepac wrote: Friday 19 November 2021 13:48 Hello,

I am suffering from timeout error regularly. I need to press 2 or 3 times F5 in order to make Dashticz work (which is not easy on touchscreen, is there a dashticz button for that?)...but it eventually works so it is difficult to debug!
My setup:
raspberry pi with domoticz on it (192.168.0.19:9090) connected to my lan with ethernet
raspberry pi 3B with dashticz on it (and touchscreen with chromium) (192.168.0.61:8082) connected to my lan with internal wifi

What I tested/did:
- increased timeout in apache2.conf (Timeout 600)=> no effect
- test from several other places 192.168.0.61:8082 and other browsers (firefox, edge) => same effect (many timeout before succeed)
- try during 2 hours to ping every minute from dashticz server to domoticz server, to check if connection was not dropping => it doesn't drop. Yet I have deactivated wifi power saving into dashticz server

And so, I have regularly:
-

Code: Select all

Failed to load resource: the server responded with a status of 408 (Request Timeout)        :8082/lang/fr_FR.json?v=1637315997952:1

Code: Select all

Failed to load resource: the server responded with a status of 408 (Request Timeout) :8082/custom/CONFIG.js?_=1637320094633:1 

Code: Select all

bundle.js?t=18:309 GET http://192.168.0.61:8082/js/settings.js?_=1637316453502 408 (Request Timeout)
(or other ressource, it depends)
- more brutal:

Code: Select all

Request Timeout
Server timeout waiting for the HTTP request from the client.

Apache/2.4.48 (Debian) Server at 172.17.0.2 Port 80 
then after 2-3 refresh (F5), it works for a while...but few hours laters, timeout again
Are you running the Dashticz server in a Docker container (automatic install), or do you serve Dashticz directly from your pi?

Re: Timeout timeout timeout.... need help!

Posted: Friday 19 November 2021 14:47
by darrepac
I think through Docker:

Code: Select all

pi@magicmirrorpi:~/dashticz/Dashticz $ ps -aef | grep docker
root       749     1  0 11:04 ?        00:00:14 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
root      1283   749  0 11:04 ?        00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8082 -container-ip 172.17.0.2 -container-port 80
root      1299   749  0 11:04 ?        00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8082 -container-ip 172.17.0.2 -container-port 80
pi        5370  1627  0 14:46 pts/0    00:00:00 grep --color=auto docker
I am doubting cause I remember to have move from NGINX to APACHE manually (viewtopic.php?f=67&t=36884&p=282337#p282337)

Re: Timeout timeout timeout.... need help!

Posted: Friday 19 November 2021 17:50
by Lokonli
What is the output of:

Code: Select all

sudo docker ps

Re: Timeout timeout timeout.... need help!

Posted: Friday 19 November 2021 18:06
by darrepac

Code: Select all

$ sudo docker ps
CONTAINER ID   IMAGE       COMMAND                  CREATED        STATUS       PORTS                                   NAMES
315092e2f372   dtv3-8082   "docker-php-entrypoi…"   2 months ago   Up 7 hours   0.0.0.0:8082->80/tcp, :::8082->80/tcp   dtv3-8082

Re: Timeout timeout timeout.... need help!

Posted: Friday 19 November 2021 20:47
by Lokonli
I can reproduce the problem. It seems related to docker in combination with a Pi. I'll look into this.

Re: Timeout timeout timeout.... need help!

Posted: Friday 19 November 2021 20:48
by darrepac
Goodnews if you can reproduce it!!

Re: Timeout timeout timeout.... need help!

Posted: Saturday 20 November 2021 11:22
by Lokonli
It's caused by an old Docker version and/or old Docker PHP:apache image in combination with a Pi.

It's solved by upgrading docker and the Docker PHP:Apache image.

I'll make an update script.

Re: Timeout timeout timeout.... need help!

Posted: Saturday 20 November 2021 13:40
by darrepac
Great

Re: Timeout timeout timeout.... need help!

Posted: Saturday 20 November 2021 23:48
by Lokonli
darrepac wrote: Saturday 20 November 2021 13:40Great
ok, let's try.

First update to latest version: In the Dashticz folder execute

Code: Select all

git pull
I've added a few scripts. I would like to ask you to test two steps.

You need sufficient free disk space. Approximately 400MB.

First test. Update the Docker container image with the following:

Code: Select all

make upgradeimage
This updates the Docker PHP image and creates a new Dashticz container.
Check whether the timeouts are solved already.

If you still experience timeouts we have to update Docker itself to the latest version. This also requires an update of the Pi OS.

Execute the following command:

Code: Select all

make fullupgrade
After this your timeouts should be gone.

Please check for errors during the update, and report them here, so I can check whether everything is running as expected.

Re: Timeout timeout timeout.... need help!

Posted: Sunday 21 November 2021 23:26
by darrepac
I rebooted after each command and I let it running full day to have a better view of the results. I would say it is improving (?) but not solved for sure: still going into errors after few hours, still need 1 or 2 refresh (instead of 2 to 3?)
If it helps, the output of the 2 commands:
make upgradeimage

Code: Select all

Status: Downloaded newer image for php:7.4-apache
docker.io/library/php:7.4-apache
make start
make[1] : on entre dans le répertoire « /home/pi/dashticz/Dashticz »
Checking container dtv3-8082
Checking port 8082
sudo docker build --build-arg tz="Europe/Paris" -t dtv3-8082 .
Sending build context to Docker daemon  3.072kB
Step 1/4 : FROM php:7.4-apache
 ---> e223f1ded436
Step 2/4 : ARG tz="Europe/Amsterdam"
 ---> Running in ab6e6c032274
Removing intermediate container ab6e6c032274
 ---> 4914468d131f
Step 3/4 : RUN printf "[PHP]\ndate.timezone = $tz\n" > /usr/local/etc/php/conf.d/tzone.ini && mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
 ---> Running in 6177ba22a71c
Removing intermediate container 6177ba22a71c
 ---> d3f87b9fe1ea
Step 4/4 : SHELL ["/bin/bash", "-c"]
 ---> Running in f347bfd2a9c5
Removing intermediate container f347bfd2a9c5
 ---> a79739736384
Successfully built a79739736384
Successfully tagged dtv3-8082:latest
sudo docker run  --restart unless-stopped -v /etc/localtime:/etc/localtime:ro  --name dtv3-8082 -d -p 8082:80 --mount type=bind,source="/home/pi/dashticz/Dashticz",target=/var/www/html dtv3-8082
a7517ec6eed0fec67cad099dc409793155178f4f679926c47606d58bb69470ef

Dashticz is running at:
http://192.168.0.61:8082
http://172.17.0.1:8082
http://172.18.0.1:8082
http://172.19.0.1:8082
http://172.20.0.1:8082
make[1] : on quitte le répertoire « /home/pi/dashticz/Dashticz »
make fullupgrade

Code: Select all

pi@magicmirrorpi:~/dashticz/Dashticz $ make fullupgrade
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Deleted Images:
untagged: php@sha256:ad0b347db3d6f0422358e8dac5e749358004d03ac57f0512571c3cbdba1a8a02
untagged: php:7.4-apache
untagged: php@sha256:9af338bfcacc11bb86b41a589e428eb5153b6372451250bc25e6a0b2872888d9
deleted: sha256:209a65d56d08fce084d3811bfca8271c89b142fd93f15864916998e765fd4469
deleted: sha256:d99c7572124d272d58fefb56a6f7bdaf9283ffa018b3da96c9db16003cb1a977
deleted: sha256:82257537411d355048cf5b126ba1c0f61c112ecc46f6139974e0f9aeaefa1cc3
deleted: sha256:4c0e2b9d2b5201f467152b37673504045ac4d66e1121e1e9c5c2ca14a559dea0
deleted: sha256:addd00e1a481f8478973e5d802d0215a75c264abbcfc18c1ced3455d870211fe
deleted: sha256:670ca5a64f585c544db96223e684a468193c954622bc9a6fab1e6094c6fbea38
deleted: sha256:b3a75e0b6096997b89701e1b9a0513c1a9fa6afb53508ce5753c4cbc19701ae0
deleted: sha256:e8517af878332f7b3c21ce9ca48ab345df3062e0ceffe1253f0ca57ff0f35669
deleted: sha256:ff0f6652e1ca53542708f3ed072a02ceb13683d5e3d0ea35f592987990fe41fb
deleted: sha256:63931cea28839f688d9731fb2b5a092646b5b2eb24a34e9a0612a5a54c94a9f5
deleted: sha256:0337f8dfa5e550b548e49094837ebf52502ae3d7e4c0224ae4c07f1dd0228a6d
deleted: sha256:fcada7e763eb498ba25fd1082a99d329d00b46f7478ec6631a76700d159e626e
deleted: sha256:e3093fefdae1c9bceca7d58ff51163ced0b9c36e85143c9c27f69310bb47a8d3
deleted: sha256:c6f65a8eb831e2d6551e198221551bab9734564dd2c8b4029f42ec35b57e54f8
deleted: sha256:db1050f75e67c6a736159dcc3091ae04edaae4c9be6c592dad175c13c38ff944
deleted: sha256:ec8dddce64192b0fccb298f4686c5d8f6f6ca29a5bb8daf26f6d30ec13efec77
deleted: sha256:04ee0e48019ba5c7237e727cb69aafb4bef8430a91b975062879428324257c9f
deleted: sha256:c1532d7d05280ca7bb2b7d01bf85740d039f9713da70372e77c0bcaf3302c67f

Total reclaimed space: 335.7MB
Checking for sufficient diskspace (500MB)
sudo apt-get -y update
Réception de :1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15,0 kB]
Réception de :2 http://archive.raspberrypi.org/debian buster InRelease [32,6 kB]
Réception de :3 https://download.docker.com/linux/raspbian buster InRelease [33,6 kB]
Atteint :4 https://deb.nodesource.com/node_10.x buster InRelease
Réception de :5 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13,0 MB]
Réception de :6 http://archive.raspberrypi.org/debian buster/main armhf Packages [393 kB]
Réception de :7 https://download.docker.com/linux/raspbian buster/stable armhf Packages [15,8 kB]
13,5 Mo réceptionnés en 1min 48s (124 ko/s)
Lecture des listes de paquets... Fait
N: Le dépôt « http://archive.raspberrypi.org/debian buster InRelease » a modifié sa valeur « Suite » de « testing » à « oldstable »
sudo apt-get -y upgrade
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Calcul de la mise à jour... Fait
Le paquet suivant a été installé automatiquement et n'est plus nécessaire :
  python-colorzero
Veuillez utiliser « sudo apt autoremove » pour le supprimer.
Les paquets suivants seront mis à jour :
  containerd.io docker-ce docker-ce-cli rpi-eeprom
4 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 63,6 Mo dans les archives.
Après cette opération, 556 ko d'espace disque supplémentaires seront utilisés.
Réception de :1 http://archive.raspberrypi.org/debian buster/main armhf rpi-eeprom armhf 12.15-1~buster [903 kB]
Réception de :2 https://download.docker.com/linux/raspbian buster/stable armhf containerd.io armhf 1.4.12-1 [15,4 MB]
Réception de :3 https://download.docker.com/linux/raspbian buster/stable armhf docker-ce-cli armhf 5:20.10.11~3-0~raspbian-buster [34,0 MB]
Réception de :4 https://download.docker.com/linux/raspbian buster/stable armhf docker-ce armhf 5:20.10.11~3-0~raspbian-buster [13,2 MB]
63,6 Mo réceptionnés en 5min 21s (198 ko/s)
apt-listchanges : Lecture des fichiers de modifications (« changelog »)...
(Lecture de la base de données... 107238 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../containerd.io_1.4.12-1_armhf.deb ...
Dépaquetage de containerd.io (1.4.12-1) sur (1.4.11-1) ...
Préparation du dépaquetage de .../docker-ce-cli_5%3a20.10.11~3-0~raspbian-buster_armhf.deb ...
Dépaquetage de docker-ce-cli (5:20.10.11~3-0~raspbian-buster) sur (5:20.10.10~3-0~raspbian-buster) ...
Préparation du dépaquetage de .../docker-ce_5%3a20.10.11~3-0~raspbian-buster_armhf.deb ...
Dépaquetage de docker-ce (5:20.10.11~3-0~raspbian-buster) sur (5:20.10.10~3-0~raspbian-buster) ...
Préparation du dépaquetage de .../rpi-eeprom_12.15-1~buster_armhf.deb ...
Dépaquetage de rpi-eeprom (12.15-1~buster) sur (12.14-1) ...
Paramétrage de containerd.io (1.4.12-1) ...
Paramétrage de docker-ce-cli (5:20.10.11~3-0~raspbian-buster) ...
Paramétrage de rpi-eeprom (12.15-1~buster) ...
Paramétrage de docker-ce (5:20.10.11~3-0~raspbian-buster) ...
Traitement des actions différées (« triggers ») pour man-db (2.8.5-2) ...
Traitement des actions différées (« triggers ») pour systemd (241-7~deb10u8+rpi1) ...
Cleaning up dtv3-8082
Container dtv3-8082 exists
sudo docker stop dtv3-8082
dtv3-8082
sudo docker rm dtv3-8082
dtv3-8082
sudo docker pull "php:7.4-apache"
7.4-apache: Pulling from library/php
Digest: sha256:9af338bfcacc11bb86b41a589e428eb5153b6372451250bc25e6a0b2872888d9
Status: Downloaded newer image for php:7.4-apache
docker.io/library/php:7.4-apache
make start
make[1] : on entre dans le répertoire « /home/pi/dashticz/Dashticz »
Checking container dtv3-8082
Checking port 8082
sudo docker build --build-arg tz="Europe/Paris" -t dtv3-8082 .
Sending build context to Docker daemon  3.072kB
Step 1/4 : FROM php:7.4-apache
 ---> e223f1ded436
Step 2/4 : ARG tz="Europe/Amsterdam"
 ---> Using cache
 ---> 4914468d131f
Step 3/4 : RUN printf "[PHP]\ndate.timezone = $tz\n" > /usr/local/etc/php/conf.d/tzone.ini && mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
 ---> Using cache
 ---> d3f87b9fe1ea
Step 4/4 : SHELL ["/bin/bash", "-c"]
 ---> Using cache
 ---> a79739736384
Successfully built a79739736384
Successfully tagged dtv3-8082:latest
sudo docker run  --restart unless-stopped -v /etc/localtime:/etc/localtime:ro  --name dtv3-8082 -d -p 8082:80 --mount type=bind,source="/home/pi/dashticz/Dashticz",target=/var/www/html dtv3-8082
58560f5696fdaa53485c35912f5d3707ca8b62b5246b2528d3825d4e8d8fb499

Dashticz is running at:
http://192.168.0.61:8082
http://172.18.0.1:8082
http://172.19.0.1:8082
http://172.20.0.1:8082
http://172.17.0.1:8082
make[1] : on quitte le répertoire « /home/pi/dashticz/Dashticz »

Re: Timeout timeout timeout.... need help!

Posted: Monday 22 November 2021 19:11
by Lokonli
I think I've found a solution (fingers crossed)

The issue is being described here:
https://docs.linuxserver.io/faq

Execute the following commands on your pi:

Code: Select all

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee -a /etc/apt/sources.list.d/buster-backports.list
sudo apt update
sudo apt install -t buster-backports libseccomp2
Note:
Only do this in case you run Dashticz in a Docker container and you have 408 errors.

Re: Timeout timeout timeout.... need help!

Posted: Monday 22 November 2021 20:51
by darrepac
I will give it a try later on (travelling today and tomorrow)... but this bug seems related to an error installing a library... I don't see such error in the output I put above, no?

Re: Timeout timeout timeout.... need help!

Posted: Monday 22 November 2021 20:59
by Lokonli
As a result of the incompatible library the time inside within the Docker container is fixed on 1 January 1970.

This causes all kind of errors, including cancelling of network requests.

It took some time to sort this out ...


Verstuurd vanaf mijn AC2003 met Tapatalk


Re: Timeout timeout timeout.... need help!

Posted: Monday 22 November 2021 21:16
by darrepac
ok interesting!
Will give definitively a try if not tomorrow, the day after tomorrow!

Re: Timeout timeout timeout.... need help!

Posted: Wednesday 24 November 2021 8:19
by darrepac
First time it works at reboot without the need to refresh the webpage... I let it running some hours and see if the problem is definitively solved

Re: Timeout timeout timeout.... need help!

Posted: Wednesday 24 November 2021 18:12
by darrepac
1 full day without any timeout issue, I think the problem is solved!!
Congrats! was not an easy one and I think it will be useful to others!

Re: [Solved]Timeout timeout timeout.... need help!

Posted: Wednesday 24 November 2021 20:54
by Lokonli
Thanks for the confirmation. Happy to read it's solved.

Re: [Solved]Timeout timeout timeout.... need help!

Posted: Sunday 02 January 2022 17:15
by Chris78
This topic saved me :)
In Chrome I needed to refresh a couple of times, Safari was a no-go.
After the fix, everything is working fine, so thnx!