News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Evert Pot's Blog:
Forking and MySQL connections
December 03, 2008 @ 12:07:32

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.

0 comments voice your opinion now!
fork mysql connection pcntlfork pcntlwait


blog comments powered by Disqus

Similar Posts

Matthew Turland's Blog: PHP 5.2 and SQL Server 2000 on Windows XP

Vid Luther's Blog: Changing MySQL storage engine for one table in your Propel/Symfony project

WorkingSoftware.com.au: Something Like Threading- PHP Process Forking & Interprocess Communication

Evolt.org: Failover Database Connection with PHP + mySQL

Job Posting: 65media Seeks PHP/MySQL Developer (Marina del Rey, CA)


Community Events

Don't see your event here?
Let us know!


version php7 laravel5 api opinion video laravel community release development voicesoftheelephpant unittest introduction series library framework podcast language extension interview

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework