Unexpected restart of Gladys

Hello everyone,

Since version 4.45, occasionally my Raspberry Pi 4 (RPI4) starts to lag for a few minutes and I noticed that it was during the migration to DuckDB. I thought the migration had been done once and for all. Can you shed some light on this :bulb:.


Thanks in advance

@Psoy, check, but it looks more like restarts (unexpected or not) because the migration only occurs automatically on each Gladys restart.

Hence the slowdowns, because you must be hitting the restart period.

thanks for your answer @Terdious
but how do I check that?

System view, maybe?


But not sure it will survive the reboot.
Otherwise via SSH:
docker ps

Should I restart Gladys?
I’ve already cleaned the database.

No no, to see your last

I ran a docker ps, and it’s true that Gladys restarted 7 hours ago,

First, try running the command over SSH or directly from the command line. Check when Gladys last restarted.

I just did it and it’s true Gladys restarted 7 hours ago.

Ok so that’s the reason!! ^^
Now, why, that’s another question ^^

Would restarting Gladys bring anything?

Hi @Psoy, I’ve moved this topic into a dedicated one :slight_smile:

It would be best to have the Gladys logs to understand what’s happening!

docker logs gladys

hello @pierre-gilles
I did think about attaching the logs, but there are so many lines that I’d overwhelm the post :wink: how can I do that?

Either you choose the right logs yourself (you can take the most recent ones), or if you don’t really know, you can use https://pastebin.com/ :slight_smile:

I have this, which has come back twice since Gladys was restarted, 22 hours ago


2024-09-13T07:00:00+0000 \u003cerror\u003e index.js:15 (process.\u003canonymous\u003e) unhandledRejection catched: Promise {
  \u003crejected\u003e NotFoundError: DeviceFeature mqtt:tempo_virtuel not found
      at DeviceManager.newStateEvent (/src/server/lib/device/device.newStateEvent.js:17:11)
      at EventEmitter.emit (node:events:517:28)
      at Event.emit (/src/server/lib/event/index.js:18:16)
}
2024-09-13T07:00:00+0000 \u003cerror\u003e index.js:16 (process.\u003canonymous\u003e) NotFoundError: DeviceFeature mqtt:tempo_virtuel not found
    at DeviceManager.newStateEvent (/src/server/lib/device/device.newStateEvent.js:17:11)
    at EventEmitter.emit (node:events:517:28)
    at Event.emit (/src/server/lib/event/index.js:18:16)
2024-09-13T07:00:00+0000 \u003cerror\u003e index.js:15 (process.\u003canonymous\u003e) unhandledRejection catched: Promise {
  \u003crejected\u003e NotFoundError: DeviceFeature mqtt:reglage not found
      at DeviceManager.newStateEvent (/src/server/lib/device/device.newStateEvent.js:17:11)
      at EventEmitter.emit (node:events:517:28)
      at Event.emit (/src/server/lib/event/index.js:18:16)
}
2024-09-13T07:00:00+0000 \u003cerror\u003e index.js:16 (process.\u003canonymous\u003e) NotFoundError: DeviceFeature mqtt:reglage not found
    at DeviceManager.newStateEvent (/src/server/lib/device/device.newStateEvent.js:17:11)
    at EventEmitter.emit (node:events:517:28)
    at Event.emit (/src/server/lib/event/index.js:18:16)

But the information related to the Gladys restart has been overwritten since then; as soon as it restarts unexpectedly, I’ll send you the relevant logs

Oh, are you sure? Logs are only overwritten if the container is deleted/recreated, but not if the container restarts.

Can you post the complete logs for us anyway?

So I misspoke, I don’t see them anymore on the SSH screen I can’t go back any further
I’ve put the logs on https://pastebin.com/
do you have them?

No, you need to send a Pastebin link, not the link to their homepage :smiley:

Is this better: https://pastebin.com/Nyj5qpkD :thinking:

Indeed, the log is very short, I don’t see the restart!

Send us the logs again if you’re having the problem :slight_smile:

For info, you can create a scene in Gladys that will run when Gladys starts:

If you set the action to send you a Telegram message, at least you’ll know when Gladys restarts :wink:

2 Likes