Sssd crashes during high system load

NethServer Version: 7.9.2009

Hello @support_team , @mrmarkuz

My Nethserver has begun having an issue with sssd crashing during the evening almost daily. I run my Nethserver on Proxmox host where my host is not oversaturated and has lots of Ram CPU resources available (only one other small VM is on this host). Lately I’ve been receiving emails from my Nethserver that I have high system load. Shortly thereafter my SSSD stops working which breaks my Webstop email GUI. I have been looking to add a solution whereby I run a corn job to restart SSSD. I found a post on the forums with the corn job line. I’m using crontab manager to try and add the following command:

systemctl is-active --quiet sssd || sssd restart

But I receive an error that ‘The validation has been failed: This command line is not allowed : [ “\” ]’

I’m including a screenshot of the new corn job I’m creating.

Please assist with how I can create this cron job.
Also if there is a solution to this problem please let me know what I can do to stop this service from crashing. I’ve searched the forums and found others with a similar problem but so far I have not seen a solution.

Thank you in advance for any help you can provide me.

You could put the command to a script and run the script as “command of the job”:

2 Likes

Thank you @mrmarkuz , I totally forgot this was an option. I’ve created a script and put it into /usr/local/bin:

#!/bin/bash

# Set the log file path
LOG_FILE="/usr/local/bin/sssd_restart.log"

# Check if sssd is active
if ! /usr/bin/systemctl is-active --quiet sssd; then
    # If not active, attempt to restart it
    if /usr/bin/systemctl restart sssd; then
        echo "$(date): sssd service was not running and has been restarted successfully" >> "$LOG_FILE"
    else
        echo "$(date): sssd service was not running and failed to restart" >> "$LOG_FILE"
    fi
else
    # If active, do nothing and exit silently
    exit 0
fi

I then added this to my crontab manager and it’s working perfectly now.

I’m still working on my upgrade path to NS8. Does NS8 handle sssd failure during high load better?

There’s no sssd in NS8 anymore.

2 Likes