• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Question: Too much connections from own server ip?

Azurel

Silver Pleskian
I see in my session database its growing up very high (3x-4x as usual). In my MRTG stats I see normal connections. I use this command for:
netstat -n -p | grep SYN_REC | awk '{print $5}' | awk -F: '{print $1}'
List all the unique IP addresses of the node that are sending SYN_REC connection status.

And get this result:
13 xx.xx.xx.xx
13 xx.xx.xx.xx
13 xx.xx.xx.xx
14 xx.xx.xx.xx
15 xx.xx.xx.xx
17 xx.xx.xx.xx
18 xx.xx.xx.xx
29 2a02
31 2003
226 127.0.0.1
3134 SERVER-IP
4297

Its normal that the server have a value of >3000?
I think the last value is the total sum of all connections.

My Apache config is this:
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 1000
MaxClients 1000
MaxRequestsPerChild 4000
</IfModule>

Can anybody help me her?
 
Your MaxClients is WAY WAY WAY too high. What is the current size of your apache process? Multiply that x 1000. Is that greater than your RAM? If so, the machine is likely going into swap. I usually start with MaxClients = 2x vCPUs in the box (grep -c processor /proc/cpuinfo). Then make sure that MaxClients x apache process size isn't over your RAM.

You can come up with your MaxClients from there, depending on the type of connection that your clients have. (Dial-up users need to be spoonfed, etc.) But make sure you never get yourself into a swapping situation.

Then set your Min, Max, and Start servers to MaxClients. There's no real need to have them differ in a dedicated server environment.

Then do some testing with ab (as goose notes.)
 
Really? I have use this script: http://techietent.blogspot.de/2013/05/script-to-calculate-maxclients-in-apache.html on a server with 32GB RAM and a 6 Core CPU.

# ./maxcalc.sh

Total Memory = 32105
Largest httpd Process = 30
Mysql Memory = 1079

So, The MaxClients = 1034
(we can use nearest round of value from 1034)

I have set it back to MaxClients 500 and execute
# /etc/init.d/httpd graceful

The count of high session is still present.



-- Out of topic. I get this very often. Is this a problem with the forum?
Your submission could not be processed because the token has expired.
Please reload the window.
 
Back
Top