Thanks for your answer.
mysql_close doesn't close the conection... I checked with show processlist... The connection is still there, just in "sleep" mode.
The script does not need a connection to the mysql server more than in the start and in the end... in the middle (while downloading a file from a FTP and then parse it to the browser) it doesn't need it.
As I said before, I've read in the old php manual (user notes) people telling that mysql_close won't work on a linux server... I'm not 100% sure if it's still true... but when I checked the connection was still there after mysql_close.
More suggestions ? 🙂