Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21
Hi all. I am having a problem with my Redhat 7.3 server. I have it setup running an FTP server, and Apache, which is serving a few websites. It's been ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2003
    Location
    Canada eh?
    Posts
    16

    Slow initial connection delay for redhat server


    Hi all.

    I am having a problem with my Redhat 7.3 server.
    I have it setup running an FTP server, and Apache, which is serving a few websites.

    It's been running great for almost a year, but recently it's started having REALLY slow initial connection delays.

    If you go to www.jaggedpath.com (for example, that's one of the hosted sites), the first time you go to the URL, it takes forever to start loading the page information. Once it loads the first time, other parts of the same site load ok.
    FTP is the same. You'll try to FTP to any account (anonymous or otherwise), it will connect, then you will wait for a long time before being presented with the login / password prompts.
    But once logged in, it's fast.

    I've talked to my ISP about a possible reverse DNS problem, they swear up and down that their DNS is just fine.

    The interesting thing is, if I was to put your IP into the /etc/hosts file, the initial connect is instant. No delay at all.

    Any help GREATLY appreciated!
    I'm going nuts here.

    Take care

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    what sort of load is the server under?

    try running "top" at the command prompt, see if you have anything that shouldnt be there. also, what amount of memory is free?

    also, you could try increasing the amount of child processes apache is allowed to fork, especially if the server is busy.

    Try giving the server a reboot. you may not want to do it for a production server, which i can totally understand, but you never know what effects of randomness occur

    When i looked at your site, it seemed constantly slow to me, where is the backed database? If its on a seperate server, check the load average on that. What sort of link is there between the DB and the webserver? if your DB is hosted at home on a DSL link, and your webserver is in a datacenter, that may be a case where such speed penilitys would occur.

    Jason

  3. #3
    Just Joined!
    Join Date
    Jun 2003
    Location
    Canada eh?
    Posts
    16
    Hi Jaguar, thanks for the quick reply.

    The websites and the MySQL db(s) are hosted on the same machine, which is located in an office building that has a very quick connection (don't know th exact specs).
    It was really fast until about 1 week ago, when this started.

    The strange thing is, if I was to put your IP in the /etc/hosts file, the site would load instantly for you. No delays at all.

    If there was a way to put a *.* in the hosts file, so it dosn't have to look up anyone, it would be great

    I did end up giving in and rebooting the machine, uptime is sitting at 1day 6h:55m Hasn't said that for awhile. lol
    Unfortunatly, it had no effect on speed.

    One other thing to note, the delay is also present when you attempt to connect to the server via FTP or TELNET aswell.

    Thanks for any thoughts!

  4. #4
    Linux User
    Join Date
    Jun 2003
    Location
    Calgary, AB CANADA
    Posts
    496
    I'm not much of a network guy, but I'll throw in my $0.02 CDN...

    Are you logging traffic on the server? If so, then the server would be looking up the ip everytime someone tries to connect and then performing a look-up to get the hostname. Might explain why adding the ip to /etc/hosts solves it for that connection?? Just a shot in the dark, but might be worth looking in to and disabling the logs.

    G/L!

  5. #5
    Just Joined!
    Join Date
    Jun 2003
    Location
    Canada eh?
    Posts
    16
    Hi CopperTop, another Canadain eh?

    I have hostnamelookups OFF in the httpd.conf, so it shouldn't be looking up anything.

    Because it also happens with FTP, Telnet, and HTTPD, I think it's a problem with the hostnames being looked up (As you said), but with linux networking itself, not a specific application. IF that makes any sence.

    Sorry for being so vague, I'm still pretty new to Linux (less then 1 year using it on and off), moving over from IIS, learning as I go.

  6. #6
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    Slightly different angle on the log file is to go back to the last you remember they were fine and start doing a overview of them. Look for changes or patterns that didn't happen when all was well. What do you see or in somecases don't see?

    On j's point what are your top ten ps using a "top -C" along with cpu usage and mem? Anything odd there?
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  7. #7
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    Hmm...

    Thinking back, i once had a similar issue, i installed PortSentry, and it seemed to slow everything down. Have you got PortSentry installed?

    You say this started happening a week ago? - Did anything change just before this started happening that you can think of? any minor system configuration change? new software installed? existing software patched or upgraded?

    Jason

  8. #8
    Just Joined!
    Join Date
    Jun 2003
    Location
    Canada eh?
    Posts
    16
    I havn't installed PortSentry, or anything else recently unfortunatly.
    My top 10 processes are:

    top
    xvnc (when I have it running and I'm logged in)
    httpd
    init
    awstats.pl (when a user is processing their logs)
    keventd
    kapmd
    ksoftirqd_CPU0
    kswapd
    syslogd

    Others pop in and out as they are called and finish, but those ones seem to stay in the list.

    There are 90 total processes
    76 sleeping
    mem: 380788K
    used: 367824K

    Going through some of the logs for various hosted websites, I don't notice any changes between entries made 3 weeks ago and entries from today.

  9. #9
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    What about your avg cpu usage? I see you RAM usage is high.

    ksoftirqd_CPU0 maybe a normal service for your distro but I don't recognise it. Anyone know about this service?
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  10. #10
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    Quote Originally Posted by fastlanwan
    What about your avg cpu usage? I see you RAM usage is high.

    ksoftirqd_CPU0 maybe a normal service for your distro but I don't recognise it. Anyone know about this service?
    Not to sure what it is, but it seems to be on every Redhat box i have a login onto.

    Happydude, what was your CPU usage like when you ran top?

    Jason

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •