Symptoms
- Plesk is not accessible: 
Error 2002. ERROR: PleskDBException: Unable to connect to database: mysql_connect(): Connection refused /var/run/mysqld/mysqld.sock (Error code: 2002) 
- MySQL/MariaDB crashes intermittently. There is an error in 
 /var/log/mysqld.log
 InnoDB: Initializing buffer pool, size = 128.0M 
 InnoDB: mmap(137363456 bytes) failed; errno 12
 InnoDB: Completed initialization of buffer pool
 InnoDB: Fatal error: cannot allocate memory for the buffer pool
 [ERROR] Plugin 'InnoDB' init function returned error.
 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
 [ERROR] Unknown/unsupported storage engine: InnoDB
 [ERROR] Aborting
Cause
MySQL/MariaDB buffer size is bigger than free RAM available on the server.
Resolution
Contact system administrator to allocate more RAM to the server.
As a temporary workaround:
- Connect to the server using SSH.
- Check how much free RAM there is on the server:
# free -hm 
 total used free shared buffers cached
 Mem: 1.0G 122M 901M 92K 0B 61M
 -/+ buffers/cache: 61M 962M
 Swap: 1.0G 0B 1.0G
- Set MySQL/MariaDB buffer pool size in 
 /etc/my.cnfinnodb_buffer_pool_size=100M 
- Restart MySQL/MariaDB service:
# service mysqld restart || service mysql restart || service mariadb restart