CP enabled = CPU usage goes to 100% and seemingly beyond with
-
I had just the same problem some time ago. The solution was to close down Captive portal. After that CPU usage returned back to normal. (5-10%). The box was a firewall for a lan party with about 110 attendants. i can't post any info about the processes since the box is not online anymore but I had the same problem as Justinw.
Everything was deadly slow and there were loads of these "39542 ?? RL 0:00.51 /usr/local/bin/php /usr/local/captiveportal/index.php" php processes.
The cpu usage also went 100%Edit: The version I am using is 1.0.1
-
1.0.1 is old use a snapshot like 06-02-2007
-
When I made this post, the snapshot I was using was only 1-2 days old, I haven't been able to try it with more recent snapshots, but should be able to soon, let you know then what happens.
-
Same problem occurs on a WRAP box when capitive portal is enabled on the OPT1 wireless interface without using RADIUS only the local user manager.
-
Anybody please test with the latest snapshot. Fastcgi was enabled for the CP webserver wich should speed things up.
-
I've tested it, I also added an additional 512 ram to the server as well. The usage still hits 100, but it hasn't crashed the server yet, and watching top, the 100% times are just spikes, not holding steady anymore. No more than 5 requests or so get lined up in top before they all get cleared out. Still pretty intense but seems to be working better. Thanks for the fix
-
Sullrich mentioned in the past also that he runs a setup with 5,000 users using the CP. I'm running a lot less users (about 10-15 times less). Anyone else that could advise on hardware specs for 250-500 users with a cp would be helpful. Right now it may be somewhat skimpy 1.5 ghz duron with 768 ram. The CPU is pegged with 3-4 users hitting the CP. Right now max concurrent connections is actually set to 1. If I understand right this means a single user can only open 1 thread, and the max is open at once is either 4 or 16, not sure which? If there are ways to optimize the portal that would be helpful to know about as well. Thanks in advance.
-
I am having the same issue with a 3G Pentium with 2G of memory and 2G swap space. I have not had issues with the CP until today. CPU was 100% and swap space was totally consumed and the the system completely locked. After reboot the system would work for approximately 5 minutes and then reinitiate the same process. After man frustrating recycles, I disable CP completely. Any assistance will be greatly appreciated.
Thanks,
-
Any abnormal traffic coming in through the CP enabled interface that is flooding the CP page? Also what does top report when it starts to freak out?
-
Also check the state tables. How many states are active to the captive portal.
I have found a lot of environments that have viruses and such that are making outbound port 80 connections that end up getting sent to the captive portal. What this does is overwhelm the machine due to the amount of requests a second that some viruses attempt.
If you find that clients are making too many requests a second limit the client connection count in the Captive Portal settings screen.