Re: php session memcache handler 3x more sets than gets
| From: | Brian Moon | Date: | Fri, 05 Jun 2009 14:14:21 +0000 |
| Subject: | Re: php session memcache handler 3x more sets than gets | ||
| References: | 1 2 3 4 5 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-6453@lists.php.net to get a copy of this message | ||
Well, this is one of my servers that serves sessions from memcached:
STAT cmd_get 39241778
STAT cmd_set 13867945
I don't see the problem you are having. So, it is most likely something in your application that is triggering this.
Brian.
--------
http://brian.moonspot.net/
On 6/5/09 3:45 AM, Stan wrote:
Sorry I hit send by accident. After 3 days of running stats look like this: [pid] => 12709 [uptime] => 259609 [time] => 1244191048 [version] => 1.2.6 [pointer_size] => 64 [rusage_user] => 1006.506902 [rusage_system] => 1499.481711 [curr_items] => 349780 [total_items] => 35164170 [bytes] => 948076261 [curr_connections] => 65 [total_connections] => 12607 [connection_structures] => 366 [cmd_get] => 16090102 [cmd_set] => 47463042 [get_hits] => 15861119 [get_misses] => 228983 [evictions] => 0 [bytes_read] => 140470568138 [bytes_written] => 140258406873 [limit_maxbytes] => 1073741824 [threads] => 4 Is there a way to debug session handling? I there anyone who can confirm this is not correct behaviour? So I can report this as a bug... Thanks. Stan Stan wrote:Nope there are no indications of such attack. Still this is happening constantly.. after 3 day of Stan wrote:That was my only logical reason why this could ever happen but we are private dating site and users can't browse web unless logged in so there is no really point to just come to see something and then leave. But as I'm thinking about it there might be someone trying to brute-force user accounts. Doing many requests and after login fail they obviously delete cookie so every try comes as a new session. Will have to check that possibility out. So you don't think this could be bug or normal behaviour of memcached session handler? Stan Brian Moon wrote:New sessions. You appear to have a lot of those. Does your site have a high bounce rate? People hitting one page and then leaving? If so, they will have a set without a get. The session will not exist on page load, no cookie. So, no get is needed. But at the end of the page, the set is called. Brian. -------- http://brian.moonspot.net/ On 6/4/09 10:16 AM, Stan wrote:Hi, I hope this is a right place to post this question, I apologize if is not. We are testing out memcache as session handler on oneof our production server. We have got installed version 3.0.4 of PECL memcache package. Despite read and write data to memcahce server seems to be pretty much the same we get 3x more set command than get commands which seems a little weird. I would expect 1:1 get to set similar to write and read data amount ratio. Is there a logical explanation for this? Thanks a lot Stan here is memcached stats: [pid] => 12709 [uptime] => 98239 [time] => 1244029678 [version] => 1.2.6 [pointer_size] => 64 [rusage_user] => 359.122443 [rusage_system] => 533.937369 [curr_items] => 149742 [total_items] => 12530243 [bytes] => 412168840 [curr_connections] => 58 [total_connections] => 4983 [connection_structures] => 286 [cmd_get] => 5765795 [cmd_set] => 16948817 [get_hits] => 5683669 [get_misses] => 82126 [evictions] => 0 [bytes_read] => 50024940586 [bytes_written] => 50218604759 [limit_maxbytes] => 1073741824 [threads] => 4