News Feed
Jobs Feed
Sections



Recent Jobs

News Archive
feed this:

Dave Marshall's Blog:
Defending against Cache Stampedes
January 13, 2012 @ 13:13:08

Dave Marshall has a new post to his blog showing one method for defending against cache stampedes from assaulting your caching servers and (possibly) bringing them down.

I've recently had a problem with a rather large operation (that could probably be optimised considerably, but nevermind), where by if the cached result of the operation expired, several web server threads would attempt the operation, causing some major headaches for our database and web servers. This is something I've come across before, and is commonly(?) known as a Cache Stampede. This is bad, this post describes the basics of what I've done to deal with it.

His example uses a Zend_Cache interface to Memecache, but it could be applied in other places too. His method uses a binary semaphore to check and see if there's a "lock" and sleep for a bit before checking again. Sample code is included showing how to create this system and how to refresh the data with a new expiration on a cache miss.

0 comments voice your opinion now!
cache stampede zendcache tutorial binary semaphore miss prevention



Paul Reinheimer's Blog:
PHP BUG - err mmcore failed to open semaphore file
November 11, 2009 @ 09:23:51

Paul Reinheimer came across a small bug in a recent PHP 5.2.x release of the language - a debugging message left in by mistake.

If you get an error when PHP launches along the lines of: "PHP Warning: PHP Startup: mm_create(0, /var/www/phpSessionStorage/session_mm_cli1000) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0" you're going to either need to upgrade to PHP 5.3.0 or wait for PHP 5.2.12.

It seems that some debugging code made it into the core code (but it's been corrected in the branches).

0 comments voice your opinion now!
bug debug message semaphore error


Zend Developer Zone:
Zend Weekly Summaries Issue #322
January 29, 2007 @ 12:27:00

The latest weekly summary for the PHP mailing lists has been posted over on the Zend Developer Zone. This week, discussions included:

  • Sandboxed semaphores
  • Focus on *printf [continued]
  • PHP 5.2.1 RC2 and PHP 4.4.5 RC1
  • It's all in the HEAD
Descriptions of each of the headings are provided, including code and a "short version" for those on the run.

Be sure to check back each week for a new summary.

0 comments voice your opinion now!
zend weekly summary semaphore fileinfo relrease fastcgi head openssl zend weekly summary semaphore fileinfo relrease fastcgi head openssl



Community Events





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


language application development introduction release opinion conference package custom phpunit api framework unittest community interview symfony2 podcast manifesto series test

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