Page 1 of 1
Domoticz daily crash
Posted: Thursday 05 June 2025 11:43
by HvdW
Hi,
My Domoticz suffers a daily crash between 23:00 and 24:00
For the moment I just want to know the crash time.
I followed the wiki
- edit /etc/init.d/domoticz.sh
- Uncommented DAEMON_ARGS="$DAEMON_ARGS -log /var/log/domoticz.log"
- sudo systemctl daemon-reload
- sudo service domoticz stop
- sudo service domoticz start
- sudo tail -f /var/log/domoticz.log
As mentioned in the wiki the log file will grow fast.
The wiki explains that one can set log levels.
Question: which levels could you suggest to use to start with
DAEMON_ARGS="$DAEMON_ARGS -debuglevel normal, status, error, hardware,received,webserver,eventsystem,python,thread_id" # these loglevels will make it to the logfile
For now I have sset it to:
DAEMON_ARGS="$DAEMON_ARGS -log /var/log/domoticz.log"
DAEMON_ARGS="$DAEMON_ARGS -loglevel status,error, debug"
Re: Domoticz daily crash
Posted: Thursday 05 June 2025 12:29
by waltervl
There should be a domoticz_crash.log file that shows exactly what happened and when....
Also noted in the
https://wiki.domoticz.com/Troubleshooting
And if you just store the domoticz.log (without using the extra debug logging), it is also shown when it stopped (or at least made the last entry to the log).
If you use monit to restart domoticz the domoticz.log will be overwritten.
Re: Domoticz daily crash
Posted: Thursday 05 June 2025 13:38
by gizmocuz
Are there any cron jobs on your system that has anything to do with Domoticz?
Did you enable automatic database backup? If yes, turn this off and see if that solves the issue
Do you use any scripts that creates sensors and updates them? Could it be a faulty sValue for a device?
And what is your Domoticz version?
Re: Domoticz daily crash
Posted: Thursday 05 June 2025 22:38
by HvdW
- cronjobs every 5 minutes nmap -> file, file is being read by domoticz for presence detection
- autobackup activated - does it harm? If so how come?
- 27 active textsensors are updated in most cases every minute
- Domoticz 2025-1 on RPI 3+ on bookworm
Is there a way to check which scripts are executed at a given time?
Re: Domoticz daily crash
Posted: Thursday 05 June 2025 22:44
by waltervl
At 24:00 exactly a major database backup and database cleanup is performed. This could lead to issues when there is a database issue or you have not enough disk storage or power source failure The RPi is very sensitive for low voltage which could happen on high CPU load due to database maintenance and you have a bad power source.
But first determine what and when goes wrong.
Is there a domoticz_crash.log file?
Did you enable the Domoticz log to file system? What does it say when after it stopped?
Re: Domoticz daily crash
Posted: Friday 06 June 2025 1:03
by HvdW
Here we go
Code: Select all
2025-06-06 00:05:06.170 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtim>
2025-06-06 00:05:09.654 Error: Stack frame for all threads:
2025-06-06 00:05:09.655 Error: > gdb: warning: Couldn't determine a path for the index cache directory.
2025-06-06 00:05:09.655 Error: > [New LWP 232666]
2025-06-06 00:05:09.655 Error: > [New LWP 232667]
2025-06-06 00:05:09.655 Error: > [New LWP 232668]
2025-06-06 00:05:09.655 Error: > [New LWP 232669]
2025-06-06 00:05:09.655 Error: > [New LWP 232670]
2025-06-06 00:05:09.655 Error: > [New LWP 232671]
As long as I haven't found to cause I'm using cron 1 0 * * * sudo service domoticz restart
Re: Domoticz daily crash
Posted: Friday 06 June 2025 9:56
by waltervl
00:05 for seems late for a eventsystem restart.
So it seems you daily backup or database cleanup fails or is slow. Any mention of that in the log file (starting from 00:00:xx)?
There also should be a domoticz_crash.log file.
File system has enough disk space?
What is the file size of your domoticz.db file?
Re: Domoticz daily crash
Posted: Friday 06 June 2025 10:08
by gizmocuz
Why are you updating 27 text sensors? And you only update them (i hope) when the actual text is changing?!?!
Anyway, disable the cron jobs (for sure the domoticz restart, that is insane and does not solve any problem!)
Disable the automatic backup
Next let Domoticz run overnight... see if that keeps running .... --> Fine --> continue
Not Fine-> you probably have a faulty sValue somewhere caused by scripts
When Fine...
How big is your Domoticz database? It should not be big, else you have serious issues probably caused by your 27 text sensors
Either enable the cron or the automatic backup (one of the two), let domoticz run overnight and see if it keeps running
Then you know what the issue is