Symptoms
-
In an attempt to login to Plesk the following error appears:
PLESK_ERROR: ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
-
The Plesk SQL Server is down and cannot be started due to the following error:
Incorrect function (Error code 1) at Start service PleskSQLServer at (service::startStopService line 997)
-
The next errors can be found in Event Viewer > Windows Logs > Application:
InnoDB: Cannot allocate memory for the buffer pool
InnoDB: Plugin initialization aborted with error -
The following rows appear in the
%plesk_dir%MySQLDataexample.com.err
file:InnoDB: Initializing buffer pool, size = 3.0G
InnoDB: VirtualAlloc(3263692800 bytes) failed; Windows error 8
InnoDB: Completed initialization of buffer pool
InnoDB: Fatal error: cannot allocate memory for the buffer pool
[Note] InnoDB: Initializing buffer pool, total size = 30G, instances = 8, chunk size = 128M
[Note] InnoDB: VirtualAlloc(137297920 bytes) failed; Windows error 1455
[ERROR] InnoDB: Cannot allocate memory for the buffer pool
[ERROR] InnoDB: Plugin initialization aborted with error Generic error
Cause
Based on the Windows error code (8 and 1455), there are several possible causes of the service failure:
-
The
innodb_buffer_pool_size
directive is set to the value larger than free RAM on the server. -
The paging file is too small.
-
RAM fragmentation.
Resolution
Depending on the cause, perform one of the following resolutions:
The “innodb_buffer_pool_size” directive is set to the value larger than free RAM on the server
-
Connect to the server via RDP.
-
Check free RAM on the server.
-
Open the
%plesk_dir%MySQLmy.ini
file and check the current value of theinnodb_buffer_pool_size
directive. -
Increase free RAM on the server.
Decrease the
innodb_buffer_pool_size
directive value.Note: the default
innodb_buffer_pool_size
directive value is 16M.In most cases there is no need to increase this directive value more than the
%plesk_dir%MySQLData
folder size. -
Start the Plesk SQL Server.
-
If the issue with the same error code still occurs, increase free RAM on the server or decrease the
innodb_buffer_pool_size
directive value even more.
The paging file is too small
-
Connect to the server via RDP.
-
Open the %plesk_dir%MySQLmy.ini file and check the current value of the innodb_buffer_pool_size directive.
-
Open paging file size settings via Start > Control Panel > System > Advanced System Settings > Performance | Settings … > Advanced > Change … and check the Maximum size (MB) directive value:
-
There are several possible ways for further issue resolving:
-
Set
innodb_buffer_pool_size
to the value less than Maximum size (MB). -
Set Maximum size (MB) to the value more than
innodb_buffer_pool_size
.Note: the server reboot is required to apply changes.
-
Mark the Automatically manage paging file size for all drivers checkbox.
Note: the server reboot is required to apply changes.
-
-
Start the Plesk SQL Server.
-
If the issue with the same error code still occurs, repeat step 4 and decrease/increase the corresponding value even more…