如何解决“连接超时”,虽然数据保存在数据库+邮件和短信发送

在我的项目后端,我从Excel表(50-100)导入数据,将它们保存到数据库,通过邮件和短信将这些数据发送给5人。 一切工作正常。 数据通过batch_insert()函数保存,邮件也是正确的人,短信也是所有的人。 但问题是,虽然加载一段时间后,工作是成功的后端给出错误:

The connection has timed out The server at 'domain name' is taking too long to respond. The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web. 

我如何解决这个问题。 任何想法/build议都会有所帮助。 提前致谢。

下面是一个代码来创build进度条的例子:

 function outputProgress($current, $total) { echo " <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\"> <html> <head> <style type=\"text/css\"> #progress-bar { width: 500px; background: #cccccc; position: absolute; } #progress-bar-percentage { background: #3063A5; padding: 5px 0px; color: #FFF; text-align: center; height: 20px; } #progress-bar-percentage span { display: inline-block; position: absolute; width: 100%; left: 0; } </style> </head> <body> <div id=\"progress-bar\" class=\"all-rounded\"> <div id=\"progress-bar-percentage\" class=\"all-rounded\" style=\"width: ".round($current / $total * 100 * 5)."px\"><span>".round($current / $total * 100)." %</span></div> </div> </body> "; myFlush(); sleep(1); } /** * Flush output buffer */ function myFlush() { echo(str_repeat(' ', 256)); if (@ob_get_contents()) { @ob_end_flush(); } flush(); } $current =0 outputProgress($current, count($examples)); foreach ($examples as $example) { //actions outputProgress($current, count($examples)); $current++ }