PHP Notice taking my website down: Function wpdb was called incorrectly [closed]

So every Friday at the very same time my website get’s down for almost 10 mins and then it goes back up by itself or I’ve to enable define('WP_ALLOW_REPAIR', false); and I repair the DB my self.

After enabling the debug log I’ve got almost 853 PHP notices at the same second (all the notices are at [07-Jul-2023 07:46:46 UTC]).
These first 654 notices are:
PHP Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /var/www/html/7awi/wp-includes/class-wpdb.php on line 2019.

What I’ve tried so far
“I’ve searched for this error on stack overflow and some people said they got rid of by changing the host in the wp-config from localhost to 127.0.0.1” this solution didn’t work for me.

And the rest notices are: PHP Notice: Function wpdb was called incorrectly. wpdb must set a database connection for use with escaping. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.) in /var/www/html/7awi/wp-includes/functions.php on line 5865.

I don’t have any custom functions or custom plugins and everything is up to date and I’ve disabled all the cron jobs to make sure that the recurring of the error at same time every week is not caused by a cron.
how to know if it’s a plugin or apache setting and why a notice is taking my website down while it’s not an error? and the PHP debug log is not really helping me finding the cause