RSS
 

Posts Tagged ‘sysadmin’

30 Second Delay with PHP and Memcache Sessions

02 Feb

We upgraded the servers at NeatoShop.com and Neatorama.com a couple of weeks ago, and in the past week we started noticing and receiving reports that on “some” page loads there was a 30-second delay where the page seemed to hang before finally returning any content.

The common things we could put a finger on were 1) it would seem to happen with a raw/initial page load (e.g., in a brand new incognito window), 2) it would not hang up anymore after that first page load, and 3) it seemed to happen only if we loaded neatoshop.com which was then redirected to www.neatoshop.com.

It took a ton of code profiling and countless attempts to reproduce the problem (because it didn’t happen for me on every new incognito page load), but I finally traced the delay down to session_start(). This didn’t really make sense to me because we’ve used php5-memcache (obviously with Memcached) for handling sessions with redundancy across our 7 web servers, and nothing regarding sessions nor Memcached changed on our end any time recently. So what could the problem be?

Read the rest of this entry »

 
No Comments

Posted in Bugs, PHP