[solved] Connectivity Issue?

#1
Hi,

I recently install LiteSpeed onto a new server. Everything has been fine for the first few days but then a wierd problem arises.

When clicking on a URL on my website it just says "Connecting.." and can take a very long time to load the page but if you click the link a few times it loads up fast as usual. This has been happening constantly until i reboot the server. Once i reboot it everything is fine until roughly a day later when the same problem starts happening again.

Is this a configuration issue? I have tried restarting LiteSpeed but it does not fix the problem only a full reboot of the server does.

I have never experienced this problem before even on my old server.

Does anyone have any suggestions?

Thanks!
 
Last edited by a moderator:

webizen

Well-Known Member
#2
you may have memory leak somewhere that leads to the problem observed. do 'top' from command line when this happens (do not reboot server) and see how much memory left and what process takes up most resources, etc.
 
#4
Also, please check output of "dmesg", it is likely because "ip_conntrack" limit being reached.
You are correct i ran dmesg and it showed up "ip_conntrack: table full, dropping packet"

So i ran this command and it looks like it has fixed the issue!

echo 131072 > /proc/sys/net/ipv4/ip_conntrack_max

Thanks for the fast replies :)
 
#5
Hi,

It looks like this issue is not permanantly fixed. I realised that my server was running slow again and i checked and it returned the error "ip_conntrack: table full, dropping packet" once again and i had to run the same command to try and fix it.

Is there any permanent type of fix to stop this from happening?

Thanks!
 

NiteWave

Administrator
#6
when you saw the error again, check
cat /proc/sys/net/ipv4/ip_conntrack_max
to see if your setting has been changed.

if it changed, then some other scripts are trying to set it back to default value.
in this case, change this value to 131072 in this script.

to change this value after reboot, need set this parameter in /etc/sysctl.conf
 
#7
Hi,

This seems a bit strange. I keep having this connectivity issue after roughly 24-36 hours. I have updated and risen the ip_conntrack_max to 131072 and even set it in sysctl.conf but it seems like it keeps reseting or something because after 24-36 hours the sites starts saying "connecting.." again and i either have to reboot the server or enter the same command via SSH.

Just to make sure have i written it correctly in sysctl.conf?

"# IP Conntrack Max
net.ipv4.netfilter.ip_conntrack_max=131072"

Does anyone have anymore suggestions i just really want this resolved as i cannot be available every 24 hours to restart the server etc :/

Thanks again!
 
#11
I've changed that now:

net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 3600

Should this stop the "Connecting.." issue?

Thanks again!
 

webizen

Well-Known Member
#13
you can do followings:
1. sysctl net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 43200 #(12 hours)
2. sysctl net.ipv4.netfilter.ip_conntrack_tcp_max = 512000
 
#16
Just a quick update when i try to run this in SSH:

"sysctl net.ipv4.netfilter.ip_conntrack_tcp_max = 512000 "

I get:

error: "net.ipv4.netfilter.ip_conntrack_tcp_max" is an unknown key
 
#18
Just a quick update.

It has now been 5 days and i have not had to reboot or restart litespeed at all.

It looks like that fixed it!

Thanks again for all the help that was given about this issue :)
 
Top