Box display bug - response timeout from local instance via Gladys Plus

OK, I’ll get back to you.

It’s 1:29 PM

I found it!! :slight_smile:

It’s a timeout on the Gladys Plus side because your instance takes more than 5 seconds to respond ^^

I’ll increase the timeout, because 5 seconds is potentially too short for requests that can be slow on a Raspberry Pi.

Afterwards, we should see why it takes 5 seconds to respond on your side; that’s still slow!

We have the start of an explanation.

I realize that it’s always after a period of inactivity, as if there were a sleep mode.

I changed the timeout to 15 seconds; 5 seconds was really too low given the network round-trips + potential processing time.

@Tlse-vins Let me know if you still have the bug, and I’d be happy to investigate why the requests are so slow on your side!

I hadn’t come back to tell you, my problem was just a coincidence ( my switch fried)

1 Like

@Tlse-vins After 24 hours, I noticed that you’re not the only one having timeouts, even after increasing the timeout to 15 seconds.

I identified @tiboys, @Mastho and @bjm who have the same issue.

I sent each of you an email, but I’m tagging you here too so you’re in the loop :slight_smile:

It would be interesting to compare our setups to try to identify the source.

Equipment:
Raspberry Pi 3b+
Sonoff Zigbee2MQTT USB stick
120 GB SSD

Software on the Pi:
Gladys

Connection:
Ethernet cable between the Pi and the router
Optical fiber

Are there any other points of comparison we should consider?

Equipment:
Raspberry Pi 3b+
Sonoff zigbee2mqtt USB dongle
32 GB SD card

Software on the Pi:
Gladys

Connection:
Ethernet cable between the Pi and the modem/router
ADSL 512 kbps

Hi, here is my equipment:
Équipement:
Raspberry Pi 3b+
Sonoff Zigbee2MQTT USB stick
SSD drive (but I don’t remember what size)

Software on the Pi:
Glad

Hi,

Raspberry Pi 3B+
Zigbee2MQTT CC2652R USB stick
32 GB SD card

Only Gladys on the Pi

Powerline adapter between the router and the Pi
ADSL about 20 Mbps

Hi @pierre-gilles
I’m encountering the same issue when deleting a device in the Zigbee integration.

The page appears to be processing for a moment after clicking delete; then returns as if I hadn’t deleted the device.
And when I refresh the page, I land on the « configure Gladys Plus » page.

Last occurrences at 15:34 and 15:44 on August 29.

for info : a very well-made and efficient tool : nmon
can be used in interactive mode or in collection mode for later analysis
installation via : apt install nmon
documentation : nmon and njmon | Main / HomePage
To be quick and efficient, once installed, the tool is started with the command nmon
then : h for help , c

Hi @Tlse-vins! It’s a current limitation of Gladys: when you delete a device, all the states of that device are deleted at the same time.

Zigbee2mqtt can be quite verbose, so this can represent millions of lines in the DB.

So, when you click delete on a device, Gladys has to go through the millions of lines and delete them in the DB. Depending on your disk’s read/write speed, this can be more or less slow.

Because the operation takes the full bandwidth of your disk, if you’re deleting a device that had millions of states, while everything is being deleted other requests are queued and Gladys becomes unreachable.

The medium/long-term solution:

  • Give the user tools in the UI to delete feature states in « small chunks » so as not to block the disk
  • Prevent deletion of a device that still has states

Thanks for the reply.
Now that you mention it, I think I remember that this topic was discussed with @spenceur.

2 Likes