too many connections

phattran911

Well-Known Member
#1
Hello,

Sometimes my site has too many connections, around 20,000 connections at once and even more.

In the stats, it shows

Req in Processing: 20,000
Req/second: 80

When this happens, my site is not accessible anymore.

How do I increase req/second to like 5000, so it can process all requests quickly?

Is there any configuration that I can try?

Thanks
 

phattran911

Well-Known Member
#3
There is no option to increase req/second in there. What exactly in "Per Client Throttling" in Server->Security you want me to tune up?

This is not a DDOS attack because I know my site has around 50 thousands users - 100,000 users when that happens. So when each user makes a request, that just kills the site.
 

NiteWave

Administrator
#4
"req/second" is "requests/second", it tells about how many people are accessing your website, server side can't control it.

are your server a download server?

it's possible 1 IP setup 100 or more connections to your server, while this client feels fast enough, other clients don't. By limit the number of connections 1 IP can establish, you can serve more people or different IPs concurrently.
 

phattran911

Well-Known Member
#5
My site is live video streaming service. Here is the scenario.

There are 20,000 people watching a live channel. Since they are watching, all connections are already closed. I am the admin and I disable that channel (for a private reason that I have to disable the channel). Immediately 20,000 people will request that channels at once.

In the stat page, I see:

Req in Processing: 20000
Req in second: 80
.......
EAPro Req/Sec: 20000

Then the server load will increase and nobody can access the site anymore.

I switch to litespeed load balancer in hope to fix this problem but load balancer has the same exact issue
 

phattran911

Well-Known Member
#7
The connection is closed on the mainsite. They are still connecting to the flv and rtmp servers, which are located on different servers, not the mainsite. I only have problem on the mainsite.

I am using lsws for it and it has the same problem. When I try to use lslb, it has the same issue or even worse.
 

phattran911

Well-Known Member
#9
Sometimes it lasts for 5 minutes - 10 minutes. However if there are too many connections, sometimes it can take to 30 minutes. And if I continue to ban other live channels, it can take 1-2 hours. I consider my site dead. My site can not grow just because of this
 
#10
"around 20,000 connections at once and even more" really a challenge for any web server, it may reach or exceed some system resource limit.

but something must be wrong if taking about 5-10 minutes or longer to live. what happen when restarting web server in this situation? does the web server back to live qucikly?

how did you disable a channel? maybe this is a place you can get some improvement here.
 
Last edited:

phattran911

Well-Known Member
#11
Do you know why lslb still won't help? I thought if I used lslb, it would help me with this too many connections. However, when 20000 at once, lslb is dead also. It can't redirect user to the site servers. I wonder how big sites do load balancing? Sure they always have over 20000 requests at once
 
#12
revisit this thread.

should prevent:
"EAPro Req/Sec: 20000"

this means: 20K requests to external process, like php. this may kill one server and make it no response.

assume the 20K requests to long_run.php
to deny access within long_run.php is not a good idea, since still need launch many lsphp processes. instead, can add a rewrite rule

RewriteRule long_run.php empty.html

in this way, 20K requests can be "processed" qucikly and won't take down the whole web server. so web master disable the access to the .php efficiently and visitors can continue to access other pages.

Just an example for reference.
 
Top