[solved] Connectivity Issue?

Discussion in 'Install/Configuration' started by ZenoX, May 13, 2011.

  1. ZenoX

    ZenoX Member


    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?

    Last edited by a moderator: May 14, 2011
  2. webizen

    webizen Well-Known Member

    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.
  3. mistwang

    mistwang LiteSpeed Staff

    Also, please check output of "dmesg", it is likely because "ip_conntrack" limit being reached.
  4. ZenoX

    ZenoX Member

    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. ZenoX

    ZenoX Member


    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?

  6. NiteWave

    NiteWave Administrator

    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. ZenoX

    ZenoX Member


    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

    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!
  8. webizen

    webizen Well-Known Member

    paste the result of the following here.
  9. ZenoX

    ZenoX Member

    net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 432000
  10. webizen

    webizen Well-Known Member

    change it to 3600. i.e.

  11. ZenoX

    ZenoX Member

    I've changed that now:

    net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 3600

    Should this stop the "Connecting.." issue?

    Thanks again!
  12. ZenoX

    ZenoX Member

    Actually after doing this the site has slowed down quite alot :S
  13. webizen

    webizen Well-Known Member

    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
  14. ZenoX

    ZenoX Member

    Ahh ok thanks!

    Do i add this to sysctl.conf aswell?
  15. webizen

    webizen Well-Known Member

    yes, add to sysctl.conf to make it permanent.
  16. ZenoX

    ZenoX Member

    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
  17. webizen

    webizen Well-Known Member

    should be net.ipv4.netfilter.ip_conntrack_max instead.
  18. ZenoX

    ZenoX Member

    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 :)

Share This Page