New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phpMyAdmin no longer streams the export data #14478
Comments
|
Please explain what you mean by "at lot of tables" in terms of the number of tables and the total size of them. |
|
We have around Prior to 4.8.0, the export would immediately start the download of the export data. phpMyAdmin would stream the data to the browser as it is processing the tables. After 4.8.0, phpMyAdmin seems to generate the entire export data and only send the export file to the client after all tables have been processed. |
|
i try to export data only (350,000 rows) in v4.8.1, after click the run, the whole screen freeze and saw the server memory usage 100%, after a few mins, the SAVE button window popup but in v4.6.6, click the run, will first show the SAVE button window, then will use less memory just like read and write, read and write |
|
Possibly the same issue. The export function no longer works with 4.8.2 on Amazon RDS. After clicking the "Go" button and a slight delay, I get a "File Not Found" error for |
|
Here are the log messages from nginx (sanitized): |
|
Also found the following in PHP logs: |
|
Git bisect found that the fist bad commit is 9f27920 and I agree since calling Comment the lines out and the export works again for large tables ! |
Fixes: phpmyadmin#14478 Signed-off-by: William Desportes <williamdes@wdes.fr>
Fix #14478 - phpMyAdmin no longer streams the export data
[ci skip] Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
|
It's still broken on 5.0.2, I had to go back to 4.9.5 for working exports. On 5.0.2 I get out of memory error, while on 4.9.5 it works flawlessly. Please reopen this bug |
|
Thank you very much @williamdes and @prcdpr :) I have exactly the same problem with PhpMyAdmin 5.0.2 and after removed the 2 lines "ob_start('ob_gzhandler');" and "ob_start();" (as indicate at 26 Dec 2018) exports of big data are working again. |
diff --git a/export.php b/export.php
index b1bf50a3079..206e84a0dbb 100644
--- a/export.php
+++ b/export.php
@@ -285,7 +285,7 @@ if (isset($_POST['output_format']) && $_POST['output_format'] == 'sendit' && ! $
$response->disable();
//Disable all active buffers (see: ob_get_status(true) at this point)
do {
- if (ob_get_length() > 0) {
+ if (ob_get_length() > 0 || ob_get_level() > 0) {
$hasBuffer = ob_end_clean();
} else {
$hasBuffer = false; |
Signed-off-by: William Desportes <williamdes@wdes.fr>
|
Hi everybody, Could you try my fix ? |
Prior to phpMyAdmin 4.8, export would almost immediately start exporting and stream the export data as it processes the tables. Since 4.8, phpMyAdmin seems to generate the export sql file on the server side and does not start the download until all tables are exported into the sql file. If there are too many tables to export, the operation may fail with a timeout.
Steps to reproduce
Expected behaviour
The export sql file download starts immediately and continues streaming the export data until all tables are processed.
Actual behaviour
The export sql file download does not start immediately. Monitoring MySQL shows that phpMyAdmin is busy generating the export data. After all tables are processed, the download starts if the export operation has not timed out.
Server configuration
Operating system:
CentOS
Web server:
Apache/2.4.6 (CentOS)
Database:
mysql 5.7.22
PHP version:
PHP 5.6.36 (cli) (built: Apr 27 2018 10:29:07)
phpMyAdmin version:
4.8.2
Client configuration
Chrome
MacOS
The text was updated successfully, but these errors were encountered: