2012-09-18 46 views
2

我想運行下載許多大文件的動作http://site.com/rss/rss_import
我使用:Zend和長執行動作

ignore_user_abort(); 
set_time_limit(0); 

後約60秒我得到以下信息:

504網關超時

當我直接運行rss_import.php,不會出現504錯誤。
我該怎麼辦?

+0

使用CLI? http://www.god-object.com/2010/03/26/bootstrap-zend-framework-for-use-in-cronjobs/ – opHASnoNAME

回答

1

504網關超時(您可能正在使用nginx)與網絡服務器相關,而不是與php相關。服務器只是停止等待來自php-fcgi的數據。

要麼更改nginx的配置(請參閱http://wiki.nginx.org/HttpFastcgiModule#fastcgi_read_timeout),要麼使用ArneRie已經建議的命令行。

//編輯:在您使用的是Apache與FCGI我想把參數爲Apache,太(不太可能)情況:https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidiotimeout