Unable to upload database with phpMyAdmin: Script timeout passed or 504 Gateway Timeout is shown

Created:

2016-11-16 12:51:59 UTC

Modified:

2017-04-24 11:13:52 UTC

5

Was this article helpful?


Have more questions?

Submit a request

Unable to upload database with phpMyAdmin: Script timeout passed or 504 Gateway Timeout is shown

Applicable to:

  • Plesk 10.4 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

When trying to upload database in phpMyAdmin more then 500Mb getting the error..

Script timeout passed, if you want to finish import, please resubmit same file and import will resume.

Cause

The error occurs because of a huge file and the restoration process fails with timeout.

Resolution

Solution 1:

To increase timeout restoration increase the ExecTimeLimit value in

/usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php

$cfg['ExecTimeLimit'] = 3600;

Also, increase the settings in /etc/sw-cp-server/config to avoid '504 Gateway Timeout' error:

fastcgi_read_timeout 3600;
fastcgi_send_timeout 3600;

Solution 2:

You can use Command Prompt in Windows or Linux SSH:

mysql -u USERNAME -p******** DATABASENAME < mysql_backup.sql

How to access Plesk database

Solution 3:

You may split the sql file:

Download a program that will split up your SQL file, such as SQL Dump Splitter . This is a free SQL dump file splitter that will let you automatically cut and save your split SQL file.

Have more questions? Submit a request
Please sign in to leave a comment.