Slow site with high traffic

#1
Hi, I'm going to tell my problem as best I can because my English is not very good.

I have a server with 12cpu 20gb of ram and license of litespeed 2cpu

I have about 500k hits a day, from the web
We also have an app that has another 700k hits a day


The server during the day is maintained between 3-5 load average, in the evenings when the visits are higher it rises to 8-9 load average

The problem is that the web becomes very slow at the rush hour even launches bad gateway message (Usage sucuri)

Litespeed is able to handle high traffic of an app, and high traffic of web at the same time?

The real-time statistics of litespeed do not show any detectable bottleneck, so we do not know what may be happening, I hope help.

Thank you very much.
 

NiteWave

Administrator
#2
it'll be helpful if you can capture a screenshot of real-time stats in high traffic and "top -c" output
if the busy website is wordpress, should install lscache plugin for wordpress.
 
#3
The site is not wordpress, it works under php + mysql and the liteesped cache is already activated is it possible that the high usage of mysql sature the web? Would it be better if I put the database on another server?
Thank you very much.


 
#5
The transfer rate I do not know, I asked the hosting service to see what they say, but I've done a test inside the server and these are the results

Is it a good transfer?


 

NiteWave

Administrator
#6
Download: 480.94 Mbut/s
Upload: 120.30 Mbit/s
looks the server's outgoing speed limit is 100 Mbit/s, this should map to about 10M bytes/s in real-time stats's "Https Out", so may not reach the limit yet.
is it possible that the high usage of mysql sature the web? Would it be better if I put the database on another server?
possible but not sure. for accurate analysis, you may have to turn on slow-sql log etc in mysql.
even launches bad gateway message (Usage sucuri)
you can grep/analyze the access/error log, the rate of the errors during high traffic.
 
#7
Hello, when I access the ip directly without going through sucuri the web responds fast, but through sucuri is very slow ... litespeed has problems if it receives all the requests of the same ip of cdn? For example the ip of sucuri?
Is there any configuration for litespeed that goes better with inbound connections from a single ip?


Thank you very much.
 
#9
with cloudflare it happens exactly the same, the site in high traffic becomes slow ... and we have all the ips of cloudflare and sucuri in the whitelist,

how can I disable any restriction that litespeed has on an ip address?

this is a real headache and I need to fix it

thank you very much
 

NiteWave

Administrator
#10
from above #3 screenshot, looks like all the traffic is https.
what's the connection between your server and cloudflare ?
if it's https too, then there are an additional https between your web server and client browser, it may cause the delay.
decryption/encryption looks expensive.
 
#11
there is no problem in the https, I think the problem is that litespeed does not manage well the requests of a single ip (sucuri or cloudflare) the question is, how can I configure litespeed so that it does not clog with many requests of a single ip?
 

NiteWave

Administrator
#12
many requests of a single ip
you need confirm this first by grep access log.
in example of cloudflare, it has many PoPs(points of presence). while your public IP may be 1 or 2, there should be many backend IPs of PoPs from cloudflare to connect your lsws web server directly.
also please give us more info like
what's the connection between your server and cloudflare ?
 
#13
Sucuri have sent me these errors



2017/11/04 03:52:08 [error] 8487#8487: *1173727735 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xxx.xx.xx, server: xxxxxxxxx.com, request: "GET /xxxxxxxxxxxxxx HTTP/1.1", upstream: "https://xxx.xx.xxx.xx:443/xxxxxxxxxxxxx", host: "xxxxxxxx.com"

2017/11/04 03:52:09 [error] 7209#7209: *642004407 connect() failed (111: Connection refused) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: xxxxxxxxxx.com, request: "GET xxxxxxxxxxxx HTTP/2.0", upstream: "https://xxx.xx.xxx.xx:443/xxxxxxxxxxxxx", host: "xxxxxxxxxx.com", referrer: "https://xxx.xx.xxx.xx:443/xxxxxxxxxxxxx"


"what's the connection between your server and cloudflare ?"

serverhttps---sucurihttps----clienthttps
 
Top