In your original post the error is:
Debug info:
Error code: sessionwaiterr
Stack trace:
line 1269 of /lib/dml/pgsql_native_moodle_database.php: dml_sessionwait_exception thrown
⋮
pgsql_native_moodle_database.php means the site is using PostgreSQL ($CFG->dbtype = 'pgsql'). But your screenshot shows mysqld. So what are you using: PostgreSQL or MySQL (or MariaDB)?