Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Databases and Redis

phpMyAdmin stops an import and asks you to resubmit the file

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

Short answer

phpMyAdmin stops an import when it gets close to its time limit, so a large dump needs more time or a different route. Raise $cfg['ExecTimeLimit'] (default 300 seconds, 0 means no limit) and PHP's max_execution_time, or skip the browser: put the dump in the UploadDir folder, or split the file.

  • Applies to phpMyAdmin 5.2, PHP 8.3, PHP 8.4
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Find out which limit is hit. Look at the phpMyAdmin setting first, then at the PHP time limit in the php.ini your web server loads (the CLI default of 0 does not apply to web requests).

    grep -n "ExecTimeLimit" config.inc.php
    grep -rn "^max_execution_time" /etc/php/*/apache2/php.ini /etc/php/*/fpm/php.ini
  2. 2Match what you see, then jump to its fix

    1. 1The message appears after a few minutes, on a file that is too big to run in one gophpMyAdmin's own time limit is too low for the dumpFix
    2. 2Imports stop at roughly the same elapsed time every try, and php.ini shows a small max_execution_timePHP's max_execution_time is lower than what the import needsFix
    3. 3The file only imports in pieces, even after raising the limits, or the upload itself is slowThe dump is simply too large for a browser uploadFix

What does the error look like?

  • Script timeout passed, if you want to finish import, please resubmit the same file and import will resume
  • The import page stops part-way and shows only a part of the queries as executed

Cause 1 of 3

phpMyAdmin's own time limit is too low for the dump

1Check

The ExecTimeLimit option sets how many seconds a phpMyAdmin script may run, mainly for imports and exports. Its default is 300 seconds. Check whether config.inc.php sets a smaller value.

grep -n "ExecTimeLimit" config.inc.php

2Fix

Raise the value in config.inc.php. A value of 0 removes the limit, which is fine for a one-off import on a server you control.

// config.inc.php
$cfg['ExecTimeLimit'] = 0;

3Verify

Run the import again. It should finish in one pass, or get much further than before.

# in the browser: Import > choose the same file > Go

Confirmed by docs.phpmyadmin.net

Did this fix it?

Cause 2 of 3

PHP's max_execution_time is lower than what the import needs

1Check

The phpMyAdmin FAQ on big dump files lists max_execution_time next to upload_max_filesize, memory_limit and post_max_size as the PHP values to check. Print the value for the web SAPI, not the CLI.

grep -rn "^max_execution_time" /etc/php/*/apache2/php.ini /etc/php/*/fpm/php.ini

2Fix

Raise max_execution_time in the php.ini that your web server uses, then restart PHP-FPM or Apache so it is read.

; php.ini (web SAPI)
max_execution_time = 600

3Verify

Reload phpMyAdmin and import again.

# in the browser: Import > choose the same file > Go

Confirmed by docs.phpmyadmin.net

Did this fix it?

Cause 3 of 3

The dump is simply too large for a browser upload

1Check

phpMyAdmin can read a dump from a folder on the server instead of an upload. The folder is set by UploadDir, meant for files that are too big for HTTP or when PHP uploads are disabled.

grep -n "UploadDir" config.inc.php

2Fix

Copy the dump to the server (for example by SFTP), point UploadDir at that folder, and pick the file from the list on the Import page. Splitting the dump into smaller files is the other option the FAQ names.

// config.inc.php
$cfg['UploadDir'] = '/var/lib/phpmyadmin/upload';

3Verify

The Import page now shows a file list under the upload field. Select the dump and run it.

# in the browser: Import > Web server upload directory

Confirmed by docs.phpmyadmin.net

Did this fix it?

How do I stop it coming back?

  • Set ExecTimeLimit and max_execution_time before a big restore instead of retrying the browser import.
  • Keep dumps in UploadDir on the server so the browser upload step is never part of the import.
  • Split very large dumps per table when you export them.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Databases

phpMyAdmin will not import a big SQL file

Import runs for a while, then the page stops or shows a blank result

phpMyAdmin hands the upload to PHP, so PHP's limits decide the maximum size.

4 causes, each with a fix

Databases

Laravel bulk insert fails with 'too many placeholders'

SQLSTATE[HY000]: General error: 1390 Prepared statement contains too many placeholders

Laravel sends one placeholder per value, so one insert of many rows times many columns, or a whereIn with a huge list, creates a statement MySQL refuses.

3 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.