Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session key resetting old values after some time. #4532

Open
vikashpandey81 opened this issue Dec 12, 2017 · 0 comments
Open

Session key resetting old values after some time. #4532

vikashpandey81 opened this issue Dec 12, 2017 · 0 comments

Comments

@vikashpandey81
Copy link

Hi,

We are currently using 8 instances of Redis 3.2.11 server for sessions storage.
The redis instance for sessions is determined by Consistent Hash Ketama Algo.

Below is the info of one redis server instance.

redis:6381> INFO

Server

redis_version:3.2.11
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:c9f2a36594be9567
redis_mode:standalone
os:Linux 3.16.0-4-amd64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.9.2
process_id:21569
run_id:75c50d7788962a954532106c481bb1f07cd9b87a
tcp_port:6381
uptime_in_seconds:416280
uptime_in_days:4
hz:10
lru_clock:3121134
executable:/usr/bin/redis-server
config_file:/etc/redis/redis-6381.conf

Clients

connected_clients:365
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

Memory

used_memory:520345024
used_memory_human:496.24M
used_memory_rss:538750976
used_memory_rss_human:513.79M
used_memory_peak:524515088
used_memory_peak_human:500.22M
total_system_memory:41225170944
total_system_memory_human:38.39G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:1.04
mem_allocator:jemalloc-4.0.3

Persistence

loading:0
rdb_changes_since_last_save:5002
rdb_bgsave_in_progress:0
rdb_last_save_time:1513070285
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:7
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok

Stats

total_connections_received:247715
total_commands_processed:6960782
instantaneous_ops_per_sec:21
total_net_input_bytes:2702994969
total_net_output_bytes:1927789871
instantaneous_input_kbps:9.10
instantaneous_output_kbps:5.97
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:1408834
keyspace_misses:21741
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:107551
migrate_cached_sockets:0

Replication

role:master
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

CPU

used_cpu_sys:561.92
used_cpu_user:885.16
used_cpu_sys_children:242.08
used_cpu_user_children:1825.52

Cluster

cluster_enabled:0

Keyspace

db0:keys=1410284,expires=1410284,avg_ttl=7250884973

Problem :

Below is the session, key value details
which generally created after successfully login.

Key = 329a6ad5530f6XXXXXXXXafce9b9591b
value = {
'_session_id' => '329a6ad5530f6XXXXXXXXafce9b9591b',
'authorized_os_checked' => 1,
'banner' => {
'page_count_11334_1' => 1,
.
.
.
'page_count__3' => 45,
'page_count__4' => 45,
'page_count__5' => 45,
'page_count__6' => 45,
'page_count__7' => 45,
'page_count__8' => 45,
'page_count__9' => 45
},
'force_write' => 1513069963,
'from_mobile_app' => 0,
'hk' => {
'seen_roaming_access_notification' => 1,
'settings' => {
'show_full_keywords' => '0',
'show_new_ver_emp_dd' => '0',
'show_resigned' => '1',
'tele_mark_mode' => '0',
'updated_at' => 1512712856,
'user_id' => XXXXX
}
},
'isd_code_viaip' => 91,
'last_inq_details' => {},
'last_visit' => 6552,
'last_visit_time' => 688,
'mobile_app' => 1,
'reg_login_comp_load_time' => 1512723765,
'seen_notice' => undef,
'user_id' => XXXX,
'userid' => XXXX
}

If we are adding some extra fields to our session key it stores properly
and after some time only fields added later is getting omitted.
We are unable to understand why this happing to the fields added later only.

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant