I think PHP is not suited for this at all. First PHP is not thread safe, so we can not use native threading with pcntl_fork().
In second exec() is good for one process, but with multiple of them you can simply overload the server and you have no way to manage this processes (only via kill pid, its very hard and not worth it).
My best decision was curl or file_get_contents – them both simple and Apache controls resource usage. One huge minus for this feature that you can not kill it (in some cases you can) when you set_time_limit(0) and run child as daemon.
↧
Von: Nikvasi
↧