I found that the issue is related to the setting of FastCGI application of PHP. The default value of the FcgidIOTimeout is 45s. Therefore, for any PHP process which need more than 45s will return "internal server error" or "connection timeout". I tried to change the setting in .htaccess file of my website, but i didn't work. Dose anyone knows how to change the setting? Thanks a lot.