[ZBX-4322] sessions table not cleared Created: 2011 Nov 06  Updated: 2017 May 30  Resolved: 2012 Feb 25

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.8.8
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: Robert Jerzak Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: database, housekeeper
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Table 'sessions' is not properly cleared:

> select count from sessions;
----------

count

----------

2331717

----------

Oldest record in our system is from 06 Nov 2010:

> select * from sessions order by lastaccess limit 2;
--------------------------------------------------------+

sessionid userid lastaccess status

--------------------------------------------------------+

6b8b53fc8a067e724098c816e9ae69d1 19 1289071306 0
1572001ce4c8bd6e34af34671d99e11f 19 1289071500 0

--------------------------------------------------------+

Is there any place to configure clearing sessions behavior?



 Comments   
Comment by richlv [ 2011 Nov 06 ]

what is auto-logout set to for user with id 19, for example ?

Comment by Robert Jerzak [ 2011 Nov 06 ]

No, user with id 19 has no option 'Auto-logout' enabled.

Does it mean that sessions for this user are never expired?

Comment by Igor Danoshaites (Inactive) [ 2011 Nov 15 ]

Hi,

According to the source code, Zabbix housekeeper should delete session that are older than 1 year, not depending on the settings for the "Auto-logout" option.

<zalex> I can confirm this behavior:
Configuration:
mysql> SELECT alert_history, event_history FROM config;
----------------------------+

alert_history event_history

----------------------------+

2 2

----------------------------+

Debuglog:
21142:20111127:115348.681 In housekeeping_sessions() now:1322387614
21142:20111127:115348.681 query without transaction detected
21142:20111127:115348.681 query [txnlev:0] [delete from sessions where lastaccess<1290851614]
21142:20111127:115348.682 deleted 0 records from table 'sessions'
21142:20111127:115348.682 End of housekeeping_sessions():0

Comment by Alexei Vladishev [ 2012 Feb 25 ]

I am closing it, nothing to fix here.

Generated at Sun Aug 03 06:16:05 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.