On Sun, 2006-04-02 at 23:19 -0400, John (Versimedia) wrote: > I have been playing around with Apache::Session and had it working with > MySQL -- then decided to switch to Memcached
Hmmm. Do you know what memcached is? It's not advisable to store data that has no backup in it. - It only stores data in memory. If the daemon shuts down for any reason, all data is lost forever. - It only stores data until it runs out of available free RAM. Then it silently drops things. These things are fine in a cache. Sessions are not a cache. Use MySQL or something similar if your session data is important. > If I telnet to the memcached port and type "stats" to see the statistics, I > see that curr_connections is high and stays that way -- I believe this is > due to mod_perl keeping the connections open for each process. Lots of connections is not a problem for memcached. It is built to work that way. > I removed > the "Apache::DBI" library option to make sure that was not causing > persistant connections, but the curr_connections continued to stay high > after many reloads of a webpage. DBI and Apache::DBI have no connection to memcached. > It seems the failures occur after i kill and restart the memcached daemon, > but not restart Apache. Any time you restart the memcached daemon, all of your data goes away. > Oh one other question -- anyone know how to detect a failure to connect to > memcached?... it seems that if memcached is not up, that it just returns the > error that the object does not exist, rather than a connection failure > error? That's intentional. Memcached expects your program to be written so that it still works if the cache goes away. - Perrin ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Mason-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mason-users

