phpmyadmin / phpmyadmin/phpmyadmin
Import from uploaded file is very slow and gets time-out on LEMP (tested with with version 4.7.6, 4.7.9)
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 7.9k
- Forks
- 3.6k
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 36
Description
Test file: TEST generated data
~4MB compressed (~107MB uncompressed) SQL database fails to import in 5 minutes (gets web server timeout).
File uploads in seconds and starts to import. But the data is inserted very slow.
The same file on the same server, using pma 4.0.10.20, import finishes in ~30 seconds.
(Importing through mysql cli tool finishes in ~20s).
Steps to reproduce
Try to import database dump
Table Ascending Action Rows Type Collation Size Overhead
gd_cities 5,347 InnoDB latin1_swedish_ci 320 KiB
gd_configurations 0 InnoDB latin1_swedish_ci 16 KiB
gd_configuration_history 0 InnoDB latin1_swedish_ci 16 KiB
gd_countries 21 InnoDB latin1_swedish_ci 16 KiB
gd_first_names 1,172 InnoDB latin1_swedish_ci 64 KiB
gd_last_names 1,000 InnoDB latin1_swedish_ci 64 KiB
gd_regions 385 InnoDB latin1_swedish_ci 64 KiB
gd_sessions 1 InnoDB latin1_swedish_ci 16 KiB
gd_settings 17 InnoDB latin1_swedish_ci 32 KiB
gd_user_accounts 1 InnoDB latin1_swedish_ci 16 KiB
myTable 64,000 InnoDB latin1_swedish_ci 124.6 MiB
-----------
11 tables Sum 71,944 InnoDB latin1_swedish_ci 125.3 MiB 0 B
Expected behaviour
Import finishes in about 30seconds (the same, as 4.0 versiona and cli)
Actual behaviour
Gets gateway timeout, or
"Script timeout passed, if you want to finish import, please resubmit the same file and import will resume."
Server configuration
Operating system: Ubuntu 16.04.3 LTS
Web server: nginx/1.10.3
Database: 5.7.21-0ubuntu0.16.04.1
PHP version: 7.2.2-3+ubuntu16.04.1+deb.sury.org+1
phpMyAdmin version: problem tested on 4.7.6 and 4.7.9
Client configuration
Browser: Chrome
Operating system: Windows 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the timeout with the attached gendata_tmp.sql.gz dump on the stated LEMP setup, then compare import timing with phpMyAdmin 4.0.10.20 and the MySQL CLI. Trace the current upload-import path to identify why inserts are slower, and verify the dump completes without timeout and approaches the reported 30-second result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- databases, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100