Applicable to:
- Plesk 12.0 for Linux
- Plesk 12.5 for Linux
- Plesk Onyx for Linux
Symptoms
When trying to upload a database in phpMyAdmin more than 500Mb, getting the error.
PLESK_ERROR: Script timeout passed, if you want to finish import, please resubmit same file and import will resume.
Or:
CONFIG_TEXT: ERROR: Maximum execution time of 300 seconds exceeded (DBIMysqli.php:262)
Cause
The error occurs because of a huge file and the restoration process fails with timeout.
Resolution
Starting from Plesk 12.5, it is possible to import databases via Plesk. Browse to Home > Domains > example.com > Databases and use importing functionality:
If it does not help, follow one of the solutions below.
Solution 1
Increase the 'ExecTimeLimit' value:
Linux:
- Login to the server over SSH.
-
Create the file
config.inc.php
at/usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/
copying the content ofconfig.default.php
file:# cp -p /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.inc.php
-
Increase the value of
$cfg['ExecTimeLimit']
in/usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.inc.php
:CONFIG_TEXT: $cfg['ExecTimeLimit'] = 3600;
-
Increase the settings in
/etc/sw-cp-server/config
to avoid '504 Gateway Timeout' error:CONFIG_TEXT: fastcgi_read_timeout 3600;
fastcgi_send_timeout 3600; -
Restart sw-cp-server:
# service sw-cp-server restart
Note: if the issue still persist, the browser cache sholud be cleared.
Windows:
- Login to the server over RDP.
-
Create the file
config.inc.php
at%plesk_dir%admin\htdocs\domains\databases\phpMyAdmin\libraries\
. -
Copy the content of
%plesk_dir%admin\htdocs\domains\databases\phpMyAdmin\libraries\config.default.php
to%plesk_dir%admin\htdocs\domains\databases\phpMyAdmin\libraries\config.inc.php
. -
Increase the value of
$cfg['ExecTimeLimit']
in%plesk_dir%admin\htdocs\domains\databases\phpMyAdmin\libraries\config.inc.php
:CONFIG_TEXT: $cfg['ExecTimeLimit'] = 3600;
Solution 2
Upload the database via command prompt:
- Login to the server over RDP.
- Upload the database dump to the server.
- Restore the database:
C:\> "%plesk_dir%\MySQL\bin\mysql.exe" -u DBUSER -p******** DATABASENAME < .\path\to\mysql_backup.sql
Comments
0 comments
Please sign in to leave a comment.