need more than 2000 connections

#1
is it possible to have max connection for php set to more than 2000? my server is currently hitting over 2000 request and its causing a backlog and lots of 503 errors. I use this litespeed to track impression served by an adserver. All my connections are very small and short, I've disabled keep alive and reduce timeout to 20 seconds, attched is a screenshot of my current config. My hardware seems to be able to handle the load but litespeed is choking. I've also remove php suexec since it was limiting me at 500 concurrent connection.

intel E5 with 16 gig of ram and 2 120G SSD harddrive
Screen Shot 2013-05-07 at 10.09.24 AM.jpg

Screen Shot 2013-05-07 at 10.09.36 AM.jpg

Screen Shot 2013-05-07 at 10.10.52 AM.png

Screen Shot 2013-05-07 at 10.12.10 AM.jpg

Screen Shot 2013-05-07 at 10.12.22 AM.jpg
 

webizen

Well-Known Member
#2
pls paste your real-time stats (under Admin Console -> Actions). need to check 'EAProc WaitQ' column. are you using vps license since you mention 500 concurrent connections limit? also, do you use opcode cache for php speed up?
 
#3
pls paste your real-time stats (under Admin Console -> Actions). need to check 'EAProc WaitQ' column. are you using vps license since you mention 500 concurrent connections limit? also, do you use opcode cache for php speed up?
i'm running the enterprise license on a dedicated server, just 1 website. When I increase suexec above 500 it default back to 5 connections, so i just removed it. I'm using memcache. I'll post screenshot as I increase vol, I've paused traffic for now since it was dropping so many connections, but at one point I had 2000 connections and another 2000 in waitQ

Screen Shot 2013-05-07 at 11.09.42 AM.jpg
 

webizen

Well-Known Member
#4
run 'top -c' when backlog happens to see which process consume the most resource. suspect the backlog in LSWS only the symptom not the cause.
 

NiteWave

Administrator
#8
1.check if mysql is the bottleneck when WaitQ much greater than 0

2.if mysql ok, then the problem is php can't keep up with the big number of incoming requests / second

opcode cache will help
try run lsphp5 in daemon mode

3.if still can't keep with, set up another physical machine, clone current server's settings, but share a database. i.e., if the traffic still increase, have to consider the cluster solution.

the above is from openX experience.
 
#10
1.check if mysql is the bottleneck when WaitQ much greater than 0

2.if mysql ok, then the problem is php can't keep up with the big number of incoming requests / second

opcode cache will help
try run lsphp5 in daemon mode

3.if still can't keep with, set up another physical machine, clone current server's settings, but share a database. i.e., if the traffic still increase, have to consider the cluster solution.

the above is from openX experience.
How do i check if MySQL or php is the bottle neck?. I'll post my MySQL setting and php.ini shortly
 

NiteWave

Administrator
#11
in your screenshot of "top", all are php process, no mysql process seen.

if mysql is on the same machine, so likely mysql is not the bottle-neck.

also, check mysql slow query log, if any query take long time.

when WaitQ is high, check
#mysqladmin processlist
to see if many mysql query piling there.

>So no way to get more than the 2000 limit? Or are you saying I should never hit the 2000 limit?
yes, per my experience. if there is 1000 lsphp5 process running(let alone 2000), and WaitQ is keeping high, something must be wrong(for example, database blocking there), increasing the number of process number won't help at all.
 
Last edited:
#12
in your screenshot of "top", all are php process, no mysql process seen.

if mysql is on the same machine, so likely mysql is not the bottle-neck.

also, check mysql slow query log, if any query take long time.

when WaitQ is high, check
#mysqladmin processlist
to see if many mysql query piling there.

>So no way to get more than the 2000 limit? Or are you saying I should never hit the 2000 limit?
yes, per my experience. if there is 1000 lsphp5 process running(let alone 2000), and WaitQ is keeping high, something must be wrong(for example, database blocking there), increasing the number of process number won't help at all.
But do you think I need more than 2000 max connection for php? MySQL is on the same server.
 

NiteWave

Administrator
#13
I don't think so. 2000 connections means 2000 lsphp processes. how many processes on your whole server during busy time?
#ps -ef|wc

1 connection between lsphp5 and lsws can handle many requests; although it only handle 1 request at a time. once 1 lsphp5 process completes a php request, it's still running to be ready to handle next request from lsws.
 
Top