Skip to content

Not removed from sm table when client disconnects #4150

Closed Answered by prefiks
Ktshas asked this question in Questions
Discussion options

You must be logged in to vote

Yes terminate() hooks deletes entries from sm tables, but there are situations when this hook is not called (this may happen when session process is killed externally with a signal, and this may be happening when out of memory handler is triggered, it then may then looks for processes that take lot of memory and kills them - if session process is killed by this it may not clear it's entry from sm table (but usually c2s processes.

As an emergency you could also try cleaning this table manually, maybe try seeing if there are some entries older than let say N days, and try to delete them? Maybe something like this:

(fun(Host)->{selected, _, R} = ejabberd_sql:sql_query(Host, <<"select usec, p…

Replies: 6 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@Ktshas
Comment options

Comment options

You must be logged in to vote
1 reply
@Ktshas
Comment options

Comment options

You must be logged in to vote
1 reply
@Ktshas
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Ktshas
Comment options

Answer selected by Ktshas
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants