问题
I'm writing a wordpress plugin which do some time consuming XML file processing in the background. On my machine, it takes at least an hour. It doesn't consume at lot of CPU%, but it's just slow.
When I test on my windows based shared hosting, I'm getting "The FastCGI process exceeded configured request timeout". PHP of the hosting is not running in safe_mode. From much searching, I realized that calling set_time_out()
does not work when running as CGI under IIS. IIS impose another time limit here. I know that we can change the limit imposed from IIS's configuration. But it's not possible on a shared hosting. Thus I'm looking for a more user configurable way, such as having the limit configure in web.config of my site. I didn't find any information on that as most IIS users own the server.
Does such method exist? Or there's something else can be done to override the time limit impose by IIS.
回答1:
On a shared hosting environment there will most likely not be a way to alter the FastCGI Request Timeout value (as a shared hoster, we don't permit changes to this setting) as it is a server wide setting.
It's there to prevent users such as yourself from holding onto valuable resources (such as pooled php-cgi.exe instances) for longer than you need.
Also even in shared environments where you can change the timeout (where FastCGI isn't used), you'll probably find out that many hosters monitor for excessively long running requests (we do) and will warn the end user to cease and desist or be banned.
I think you need to re-think how your plugin works.
来源:https://stackoverflow.com/questions/5391481/the-fastcgi-process-exceeded-configured-request-timeout-shared-hosting