Mariadb keep on crashing after update 25.0.2

Nextcloud version (eg, 20.0.5): 25.0.2.3
Operating system and version (eg, Ubuntu 20.04): Debian bullseye
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.54 (Debian)
PHP version (eg, 7.4): PHP 7.4.33 (cli) (built: Nov 8 2022 11:40:37) ( NTS )

The issue you are facing:

After updating from 25.0.0 to 25.0.2 mariadb starting to crash after any operation.
Untill recently I could restart mariadb not anymore

Is this the first time you’ve seen this error? (Y/N): Y

Output of msqld

2023-01-16 15:24:34 0 [Note] mysqld (mysqld 10.5.18-MariaDB-0+deb11u1) starting as process 1126 ...
2023-01-16 15:24:34 0 [Note] InnoDB: Uses event mutexes
2023-01-16 15:24:34 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-01-16 15:24:34 0 [Note] InnoDB: Number of pools: 1
2023-01-16 15:24:34 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-01-16 15:24:34 0 [Note] InnoDB: Using Linux native AIO
2023-01-16 15:24:34 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2023-01-16 15:24:34 0 [Note] InnoDB: Completed initialization of buffer pool
2023-01-16 15:24:34 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=652324244,652324244
2023-01-16 15:24:34 0 [ERROR] InnoDB: Corrupted page identifier at 652324244; set innodb_force_recovery=1 to ignore the record.
2023-01-16 15:24:34 0 [Note] InnoDB: Dump from the start of the mini-transaction (LSN=652324244) to 100 bytes after the record:
 len 101; hex 01b70000000172109bd300060b470080f2901b04ffd302060b380080f290061e27e6002713050981a5010c0046131592330600b20080c30006000039003b32ffffffff0000b700ffffffff000034003b310000470080c928041768b40d0116aeb4864616ae; asc       r      G           8      '  '        F   3          9 ;2              4 ;1  G   (  h       F  ;
2023-01-16 15:24:34 0 [Warning] InnoDB: Log scan aborted at LSN 652382208
2023-01-16 15:24:34 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2023-01-16 15:24:34 0 [Note] InnoDB: Starting shutdown...
2023-01-16 15:24:34 0 [ERROR] Plugin 'InnoDB' init function returned error.
2023-01-16 15:24:34 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2023-01-16 15:24:34 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-01-16 15:24:34 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2023-01-16 15:24:34 0 [ERROR] Aborting

Some lines from cat /var/www/nextcloud/data/nextcloud.log | jq :

"File": "/var/www/myNext/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
    "Line": 210,
    "message": "Failed to fetch the Collabora capabilities endpoint: cURL error 28: Operation timed out after 45001 milliseconds with 0 bytes received (see https://curl.haxx.
se/libcurl/c/libcurl-errors.html) for https://myNext/index.php/login",
    "exception": {},
    "CustomMessage": "Failed to fetch the Collabora capabilities endpoint: cURL error 28: Operation timed out after 45001 milliseconds with 0 bytes received (see https://curl
.haxx.se/libcurl/c/libcurl-errors.html) for https://cloud.ngux.eu/index.php/login"
  }
}
{
  "reqId": "xxxxxxxxxxxxx",
  "level": 3,
  "time": "2023-01-16T13:39:14+00:00",
  "remoteAddr": "x.x.x.x",
  "user": "xxx",
  "app": "no app in context",
  "method": "GET",
  "url": "/ocs/v2.php/apps/notifications/api/v2/notifications",
  "message": "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0",
  "version": "25.0.2.3",
  "exception": {
    "Exception": "Doctrine\\DBAL\\Exception\\ConnectionLost",
    "Message": "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away",
    "Code": 2006,
    "Trace": [

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'xxxxxxxxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'mynext.xx',
    2 => 'mynext.xx',
    3 => 'x.x.x.x',
    4 => 'x::x',
  ),
  'datadirectory' => '/var/www/myNext/data',
  'dbtype' => 'mysql',
  'version' => '25.0.2.3',
  'overwrite.cli.url' => 'http://x.x.x.x.x',
  'dbname' => 'nextc',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxxxx',
  'dbpassword' => 'xxxxxxxxxx',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'updater.secret' => '$2y$................................',
  'loglevel' => 2,
);

The output of your Apache/nginx/system log in /var/log/____:

[Mon Jan 16 15:58:13.570467 2023] [php7:error] [pid 667] [client xxxxxxxxxx] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/myNext/lib/private/DB/Connection.php:139\nStack trace:\n#0 /var/www/myNext/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\\DB\\Connection->connect()\n#1 /var/www/myNext/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/myNext/lib/private/DB/Connection.php(261): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/myNext/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\\DB\\Connection->executeQuery()\n#4 /var/www/myNext/lib/private/DB/QueryBuilder/QueryBuilder.php(281): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/myNext/lib/private/AppConfig.php(415): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/myNext/lib/private/AppConfig.php(180): OC\\AppConfig->loadConfigValues()\n#7 /var/www/myNext/lib/private/ in /var/www/myNext/lib/private/DB/Connection.php on line 139