Thank you for your reply.
A log file is being increased as several hundreds megabyte in 10~20 seconds. Also the error won't be stopped by max_execution_time.
For example, the zip.db file doesn't exist in the code below, PHP will generate gigantic log files and won't be stopped itself. Just imagine that people open the webpage at the same time.... Please advise.
$fp = fopen("./zip.db", "r");
$zipfile = fgets($fp, 4096);