home 首页 » 精彩日志 » 日志查看

Evert Pot's Blog: Forking and MySQL connections

 2008-12-04 02:40:04 

Evert Pot has a quick post showing how you can make your code fork MySQL connections for better performance.

For some of our long-running processes we use PHP. It makes total sense from our perspective, because we can re-use all our existing business logic from our main PHP web application. To make things more efficient, I recently started some work on using forks and have a couple of worker processes around.

His sample script makes use of the pcntl_fork and pcntl_wait functions in PHP to spawn off processes that will be closed off when no longer needed.

收藏:

发表评论:
大名:*
网址:   http://sitename
评论:*