Hi, i've a little problem. I have about 200 users in radiusdesk and at
some point the users lose the password and the connection profile. The only
way to solve the problem is to delete the user and recreate it. Do you have
any suggestions? thanks a lot
Same issue here.
I found out that its becouse OptimiseUserStats cron job.
Looking function _remove_old_records
$this->Radacct-deleteAll(array('acctstoptime <=' => $radacct_cut_off_time));
here are some my sql log when job started
SELECT `Radacct`.`radacctid` FROM `rd`.`radacct` AS `Radacct` WHERE `acctstoptime` <= '2019-03-19 02:30:02' GROUP BY `Radacct`.`radacctid`
SELECT `Radcheck`.`id` FROM `rd`.`radcheck` AS `Radcheck` WHERE `Radcheck`.`id` = 11432
SELECT COUNT(*) AS `count` FROM `rd`.`radcheck` AS `Radcheck` WHERE `Radcheck`.`id` = 11432
DELETE `Radcheck` FROM `rd`.`radcheck` AS `Radcheck` WHERE `Radcheck`.`id` = 11432
-- skip more delete records
DELETE `Radacct` FROM `rd`.`radacct` AS `Radacct` WHERE `Radacct`.`radacctid` IN (11432, 11433, 11434, 11435, 11436, 11437, 11439, 11440, 11441, 11442, 11443, 11444, 11445, 11447, 11448, 11449, 11450, 11451, 11452, 11453, 11455, 11456, 11457, 11459, 11460, 11461, 11463, 11464, 11465, 11466, 11467, 11468, 11469, 11470, 11472, 11473, 11474, 11475, 11477, 11478, 11479, 11480, 11481, 11482, 11484, 11485, 11486, 11488, 11489, 11491, 11493, 11494, 11495, 11496, 11497, 11498, 11500, 11501, 11503, 11504, 11505, 11506, 11507, 11508, 11509, 11510, 11511, 11512, 11513, 11514, 11515, 11516, 11517, 11519, 11520, 11521, 11523, 11524, 11526, 11527, 11528, 11529, 11530, 11532, 11533, 11534, 11535, 11536, 11537, 11538, 11539, 11540, 11541, 11543, 11544, 11545, 11546, 11547, 11548, 11549, 11550, 11551)
I think bug is becouse Radacct.radacctid has same id as Radcheck.id
But i can't figure out why Radcheck delete query starts when deleting old Radacct records
Last edit: Michael Danuschenkov 2019-06-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, i've a little problem. I have about 200 users in radiusdesk and at
some point the users lose the password and the connection profile. The only
way to solve the problem is to delete the user and recreate it. Do you have
any suggestions? thanks a lot
Same issue here.
I found out that its becouse OptimiseUserStats cron job.
Looking function _remove_old_records
$this->Radacct-deleteAll(array('acctstoptime <=' => $radacct_cut_off_time));
here are some my sql log when job started
I think bug is becouse
Radacct
.radacctid
has same id asRadcheck
.id
But i can't figure out why Radcheck delete query starts when deleting old Radacct records
Last edit: Michael Danuschenkov 2019-06-17
DVD look this association
https://sourceforge.net/p/radiusdesk/code/HEAD/tree/trunk/rd_cake/Model/Radacct.php#l15
i think it's not corrent to remove nested Radcheck records when deleting old Radacct items
Ok, this could be the problem. And the solution ?
Set
dependent
tofalse
on line i provideor you can disable cron job
OptimiseUserStats
But i think we need author answer. Relation in Radacct with Radcheck looks strange.