problem with radius server user login after power failure

I have Mikrotik RouterBoard 1100 and i use it to work with Radius Server to implement the hot-spot project. During testing, i have seen it work so well, but unfortunately the power adaptor was unplugged unexpectedly meanwhile some hotspot users are accessing the internet. Suddenly there a problem on the radius side. All logged-in accounts cannot relog-in again and cannot access to internet too. It means all the process failed. There was an response message “You are already login.”

In radius server, there is no session anymore for those users. I used radwho to check.
In database, there are some records in radacct table which has no accounting stop to be updated by radius itself.

I think radius check session of user login from radacct table.

Hope you mind telling me, what the good point of Mikrotik to do preventing from that risks, And How Mikrotik can solve it?
or is there any way to run any script to overcome this issue?

Thank you in advance.
Monorith

I get this with FreeRADIUS without the power fail in some cases. The internet connection will go down and some clients log out during the outage and the logout is not relayed to the RADIUS server. It used to be called a “stale session”. Don’t know what you call it now. If you use radwho, try using radzap to terminate the user session. From a shell:

radzap -u username x.x.x.x radiussecret

Replace x.x.x.x with the ip of the radius server.

To prevent some of the stale sessions, a good UPS is required.

ADD: On User Manager, you should be able to go into the “Sessions” tab and remove the stale session if radzap doesn’t do it.