I am using a PHP system() call to run R data analyses in real time using Rscript.exe. The system() call is required rather than passthru() because the analyses take several minutes and progress notices are sent to the user through the browser. passthru(), it seems, does not stream output, but waits until the process terminates.
It works very well-except when someone hits the browser stop button in the middle of running an analyses. It seems that Rscript and/or PHP hang somehow. This also has the nasty result that all other pages hosted at the virtual host name do not serve until the Apache server is stopped and restarted. Interestingly, other virtual host names continue to function normally.
I think that this is likely a problem with too many open processes. The stalled Rscript.exe processes cannot be terminated even with administrator privileges on this Windows 2003 system.
Thanks for your insight.