<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Storing your PHP sessions using memcached</title>
	<atom:link href="http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/</link>
	<description>The repository for Debian-based LAMP servers</description>
	<lastBuildDate>Tue, 09 Mar 2010 19:37:40 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Guillaume Plessis</title>
		<link>http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/comment-page-1/#comment-2171</link>
		<dc:creator>Guillaume Plessis</dc:creator>
		<pubDate>Fri, 19 Feb 2010 16:33:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotdeb.org/?p=85#comment-2171</guid>
		<description>@Olivier : thanks for this feedback. I&#039;ll fix it (by downgrading to v3.0.3) in my next uploads</description>
		<content:encoded><![CDATA[<p>@Olivier : thanks for this feedback. I&#8217;ll fix it (by downgrading to v3.0.3) in my next uploads</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: olivier</title>
		<link>http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/comment-page-1/#comment-2167</link>
		<dc:creator>olivier</dc:creator>
		<pubDate>Thu, 18 Feb 2010 22:15:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotdeb.org/?p=85#comment-2167</guid>
		<description>Thank you Guillaume for these instructions and for providing us with the great dotdeb packages.

The php5-memcache module included in the dotdeb packages for lenny (which is based on v3.0.4 of memcache) does not work as expected for sessions redundancy on two memcached servers. The problem is not specific to the dotdeb package but is indeed due to the original v3.0.4 code of pecl/memcache:
http://pecl.php.net/bugs/bug.php?id=16061&amp;edit=1

I spent a couple of hours in order to understand what was going on and I wanted to let you know about this problem in order to save your own hair. As a workaround you can install v3.0.1 from stable.</description>
		<content:encoded><![CDATA[<p>Thank you Guillaume for these instructions and for providing us with the great dotdeb packages.</p>
<p>The php5-memcache module included in the dotdeb packages for lenny (which is based on v3.0.4 of memcache) does not work as expected for sessions redundancy on two memcached servers. The problem is not specific to the dotdeb package but is indeed due to the original v3.0.4 code of pecl/memcache:<br />
<a href="http://pecl.php.net/bugs/bug.php?id=16061&amp;edit=1" rel="nofollow">http://pecl.php.net/bugs/bug.php?id=16061&amp;edit=1</a></p>
<p>I spent a couple of hours in order to understand what was going on and I wanted to let you know about this problem in order to save your own hair. As a workaround you can install v3.0.1 from stable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lazy</title>
		<link>http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/comment-page-1/#comment-1962</link>
		<dc:creator>lazy</dc:creator>
		<pubDate>Fri, 18 Dec 2009 18:04:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotdeb.org/?p=85#comment-1962</guid>
		<description>@Laph:

memcached uses ttl provided by gc_maxlife so it can be as long as You wish as far there is space avaiable on memcached server</description>
		<content:encoded><![CDATA[<p>@Laph:</p>
<p>memcached uses ttl provided by gc_maxlife so it can be as long as You wish as far there is space avaiable on memcached server</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laph</title>
		<link>http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/comment-page-1/#comment-1960</link>
		<dc:creator>Laph</dc:creator>
		<pubDate>Fri, 18 Dec 2009 15:44:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotdeb.org/?p=85#comment-1960</guid>
		<description>@Lazy:
Ok, understood - even though I don&#039;t like it. So, last question: 
How/Where do I set the time, a Session shall be seen as expired when using memcached as session.safe_handler? Just in case someone has a web-app that needs a quite long Session expiration time. There seems to be ...uhm, nothing to take any influence on that - making &quot;memcached&quot; useless as session handler for this kind of apps because of a (possibly) too short Session TTL for PHP.</description>
		<content:encoded><![CDATA[<p>@Lazy:<br />
Ok, understood &#8211; even though I don&#8217;t like it. So, last question:<br />
How/Where do I set the time, a Session shall be seen as expired when using memcached as session.safe_handler? Just in case someone has a web-app that needs a quite long Session expiration time. There seems to be &#8230;uhm, nothing to take any influence on that &#8211; making &#8220;memcached&#8221; useless as session handler for this kind of apps because of a (possibly) too short Session TTL for PHP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lazy</title>
		<link>http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/comment-page-1/#comment-1959</link>
		<dc:creator>lazy</dc:creator>
		<pubDate>Fri, 18 Dec 2009 15:01:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotdeb.org/?p=85#comment-1959</guid>
		<description>@Laph

It can&#039;t because, you can&#039;t list items in memcached, so php can&#039;t do session gc

php sets ttl&#039;s on session objects in memcached,
and they are removed by memcached not by php&#039;s gc
so enabling php gc is pointless</description>
		<content:encoded><![CDATA[<p>@Laph</p>
<p>It can&#8217;t because, you can&#8217;t list items in memcached, so php can&#8217;t do session gc</p>
<p>php sets ttl&#8217;s on session objects in memcached,<br />
and they are removed by memcached not by php&#8217;s gc<br />
so enabling php gc is pointless</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laph</title>
		<link>http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/comment-page-1/#comment-1958</link>
		<dc:creator>Laph</dc:creator>
		<pubDate>Fri, 18 Dec 2009 14:41:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotdeb.org/?p=85#comment-1958</guid>
		<description>@Lazy:
???? 
According to PHP-Manual:
- session.gc_maxlifetime specifies the number of seconds after which data will be seen as &#039;garbage&#039; and potentially cleaned up.
- And session.gc_probability and session.gc_divisor manage the probability, that the cleanup process is started.

Therefore, with:
- session.gc_probability = 1 and
- session.gc_divisor = 100
there&#039;s a 1 Percent chance &quot;per Klick&quot; that all sessions older than 
- session.gc_maxlifetime Seconds are deleted.

IMHO, that&#039;s how PHP manages Session-Expiration (with &quot;files&quot; as session handler) and changing the session.save_handler to &quot;memcache&quot; should not change this behaviour.
Of course in memcached every element can have it&#039;s own TTL - but the PECL memcache Extension should mimic PHP&#039;s &quot;original&quot; behaviour - don&#039;t you agree?</description>
		<content:encoded><![CDATA[<p>@Lazy:<br />
????<br />
According to PHP-Manual:<br />
- session.gc_maxlifetime specifies the number of seconds after which data will be seen as &#8216;garbage&#8217; and potentially cleaned up.<br />
- And session.gc_probability and session.gc_divisor manage the probability, that the cleanup process is started.</p>
<p>Therefore, with:<br />
- session.gc_probability = 1 and<br />
- session.gc_divisor = 100<br />
there&#8217;s a 1 Percent chance &#8220;per Klick&#8221; that all sessions older than<br />
- session.gc_maxlifetime Seconds are deleted.</p>
<p>IMHO, that&#8217;s how PHP manages Session-Expiration (with &#8220;files&#8221; as session handler) and changing the session.save_handler to &#8220;memcache&#8221; should not change this behaviour.<br />
Of course in memcached every element can have it&#8217;s own TTL &#8211; but the PECL memcache Extension should mimic PHP&#8217;s &#8220;original&#8221; behaviour &#8211; don&#8217;t you agree?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lazy</title>
		<link>http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/comment-page-1/#comment-1957</link>
		<dc:creator>lazy</dc:creator>
		<pubDate>Fri, 18 Dec 2009 13:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotdeb.org/?p=85#comment-1957</guid>
		<description>@Laph:

session.gc_probability has nothing to do with
setting session ttl, my point was that
memcached has it&#039;s own gc whith will remove old objects and turning on php&#039;s gc is pointless</description>
		<content:encoded><![CDATA[<p>@Laph:</p>
<p>session.gc_probability has nothing to do with<br />
setting session ttl, my point was that<br />
memcached has it&#8217;s own gc whith will remove old objects and turning on php&#8217;s gc is pointless</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laph</title>
		<link>http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/comment-page-1/#comment-1955</link>
		<dc:creator>Laph</dc:creator>
		<pubDate>Fri, 18 Dec 2009 10:23:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotdeb.org/?p=85#comment-1955</guid>
		<description>@Lazy (&amp; Guillaume):
To clarify this: Does the TTL of the PHP-Session depend on memcached&#039;s TTL or on the Session-GC Stuff in php.ini?
I think it should be (and hopefully it is) the php.ini settings. Changing the session.save_handler should NOT have any impact on the session TTL/GC.
And in this case, my comment is right.</description>
		<content:encoded><![CDATA[<p>@Lazy (&amp; Guillaume):<br />
To clarify this: Does the TTL of the PHP-Session depend on memcached&#8217;s TTL or on the Session-GC Stuff in php.ini?<br />
I think it should be (and hopefully it is) the php.ini settings. Changing the session.save_handler should NOT have any impact on the session TTL/GC.<br />
And in this case, my comment is right.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: “Micro” Optimizations That Matter &#124; BrainPair - the Techno Blog</title>
		<link>http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/comment-page-1/#comment-1502</link>
		<dc:creator>“Micro” Optimizations That Matter &#124; BrainPair - the Techno Blog</dc:creator>
		<pubDate>Fri, 16 Oct 2009 14:38:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotdeb.org/?p=85#comment-1502</guid>
		<description>[...] your blog post list every time someone visits your blog. Put that in the cache. You can even put your sessions into memcached to eliminate disk IO. These will require some code changes, but will be worth [...]</description>
		<content:encoded><![CDATA[<p>[...] your blog post list every time someone visits your blog. Put that in the cache. You can even put your sessions into memcached to eliminate disk IO. These will require some code changes, but will be worth [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: &#8220;Micro&#8221; Optimizations That Matter &#124; BrandonSavage.net</title>
		<link>http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/comment-page-1/#comment-1497</link>
		<dc:creator>&#8220;Micro&#8221; Optimizations That Matter &#124; BrandonSavage.net</dc:creator>
		<pubDate>Fri, 16 Oct 2009 05:04:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotdeb.org/?p=85#comment-1497</guid>
		<description>[...] your blog post list every time someone visits your blog. Put that in the cache. You can even put your sessions into memcached to eliminate disk IO. These will require some code changes, but will be worth [...]</description>
		<content:encoded><![CDATA[<p>[...] your blog post list every time someone visits your blog. Put that in the cache. You can even put your sessions into memcached to eliminate disk IO. These will require some code changes, but will be worth [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
