Search code examples
erlangxmppchatejabberd

ejabberd takes more than 30 minutes to detect user session termination?


I am using ejabberd-16.02. I have the following issue: if user come online and wifi turn off or no network (user not back again on server) then ejabberd server takes more than 30 minutes to terminate user session.

Am I missing any configuration or it is default behaviour of ejabberd server ?


Solution

  • This is related to how TCP/IP works and is not specific to ejabberd. Generally, Linux is configured to detect connection loss after something like 2 hours.

    If you want to detect connection loss faster, you need to enable application level checks. For ejabberd Community Server, available feature to detect connection loss faster is mod_ping: https://docs.ejabberd.im/admin/guide/configuration/#modping