- Files as BLOB in MySQL
- Connection as root to MySQL from PHP
- set_time_limit(0);ignore_user_abort(FALSE); at start of PHP Script
- Using mysql_unbuffered_query from PHP
- Getting each row and sending it to browser zipped (on-the-fly to save RAM memory and space on disk)
- Some clients with slow connections (600Kb/s - 5Mb/s)
- Getting rows, between it can pass more that 1 minute (content is send with flush())
- SET GLOBAL wait_timeout=28800 and SET GLOBAL interactive_timeout=28800 before query execution
- MySQL is closing the connection exactly in 60 seconds (When the download of file to client is more that 1 minute)
- Query status in SHOW PROCESSLIST is "Writing to net" from start until it close.
What settings Can I adjust for prevent to MySQL closes the connection on inactivity on the middle of a mysql_unbuffered_query? Saving RAM Memory and disk.