-
Slapcat - CPU at 100%
I have been noticing lately that my untangle box has been running hot - cpu 100%
When I log into the console and run top, there are about a dozen threads all running slapcat, and sharing the CPU between them..
Is this normal?
Edit to add:
I just looked, at the moment there are 5 slapcat threads at the top of the top list, and they have (in decreasing order)
2785, 1579, 956, 544, 234 and 197 hours of runtime - since I rebooted my untangle VM 5 days ago...
Edited again: Okay, those have to be minutes, sorry.. lol
-
Does anyone have any idea - I could just reinstall Untangle, but being able to fix it would be good.
Why does slapcat do this, and is there any way to stop it?
There is currently only one instance of slapcat running in the top of the top window now, with a total of 1170 minutes.
(About how many minutes ago I rebooted my server that is running untangle)
-
Spunner,
I'll start by saying that I don't have a real answer to this. I just looked at my box which has running for quite a while, and I do not have a slapcat process running at all. It is used to generate an LDIF file, which would be used to load an LDAP directory or to modify an existing LDAP directory then reload it after mods are done.
Unless any of the dev guys can answer this definitively, I would say you should reset to factory defaults (backup first if you want so you can restore from that backup after the reset), or just reinstall. Its definitely not normal and appears that something inside is broken. That's the best I can do with the knowledge I have on the subject.
-
Was this issue ever resolved. I notice around 8am every morning lately, I've got multiple slapcat processes running, at minimum 2. The web shuts down. The system is not responsive to users. A reboot seems to be needed to fix. Watching this weekend, it's still running around 9:30am. That said, at least the surfing by users is possible
-
turns out my ldap database got corrupt. Couldn't even stop slapd. How...why..haven't a clue. Only added a couple users and seemed a day later, my reports stopped (because the cpu was maxed out and didn't get that far in the daily cron to generate them)
Quick fix turned out to be simply have untangle rebuild the directory via the following (run steps as root):
killall -9 slapd
killall -9 slapcat
cd /var/lib
mkdir untangle-ldap-dead
mv untangle-ldap/* untangle-ldap-dead
slapindex -v
reboot
everything worked great after that.
-
Worked for me too. Thanks for the info!
-
Thanks dcbour - if only you'd been there 6 months ago. lol
-
Life's like that
Funny how we find things as we need them ;)
Good news is no repeats since.
Just hope it benefits some other individual in their moment of need too.
D.
-
More info on slapcat bug
This appears to be a rarely occurring bug in the version of slapd that we use in the current version of Untangle:
#255276 - slapd/slapcat hang in endless loops - Debian Bug report logs
Two pieces of good news.
1) It's fixed in the newer version of slapd that will come with Untangle version 6.1
2) There's a better workaround that won't destroy your directory data.
From the Untangle console:
# cd /var/lib/untangle-ldap
# db4.2_recover
# /etc/init.d/untangle-slapd restart
-
Nice to know there's a fix coming... I just noticed this:
Build: 6.0.2~svn20090105r21174release6.0-1sarge
Code:
top - 18:35:44 up 2 days, 4:59, 2 users, load average: 2.70, 2.87, 2.95
Tasks: 159 total, 4 running, 155 sleeping, 0 stopped, 0 zombie
Cpu(s): 77.6%us, 21.9%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.5%si, 0.0%st
Mem: 2067120k total, 2010216k used, 56904k free, 22168k buffers
Swap: 2064344k total, 540k used, 2063804k free, 984840k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5472 root 20 0 940m 630m 8356 S 9999 31.2 585:39.99 java
22148 root 20 0 11104 2656 2088 R 96 0.1 2304:51 slapcat
2314 root 20 0 11108 2660 2088 R 89 0.1 894:11.00 slapcat
5486 root 20 0 2192 1128 848 R 1 0.1 0:00.18 top
Really working my Intel E2200 2.4GHz Dual-Core! ;)
Cheers,
Kermee