LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-28-2012, 01:06 PM   #1
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,450

Rep: Reputation: Disabled
server slow response to one computer but not the other


I am having a strange problem with a significant lag time between 1 specific computer and a server. I have a server (Slack 13.37 64bit) running apache and sshd. The http server hosts php and perl web applications and other apps are run over ssh. At a different site I have two computers running on a LAN together.

One of the clients (laptop running -current) experiences no lag time when accessing the http/ssh server. The other (Slack 13.37 64bit) experiences significant lag time (up to a minute) before getting a response if there has been no contact for a number of minutes. Once that initial response comes, there is no more lag until I stop accessing the server for a while.

I have tried both firefox and google, and both exhibit the same behavior, as does ssh.

I didnt' find anything that jumped out at me in the server logs.

Can anyone suggest where to look for the problem?

Thanks in advance.
Brian
 
Old 08-28-2012, 02:22 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 2,992

Rep: Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737
Sounds like DNS -- are you using the DNS built in to a router (or switch)? Be a good idea to use external addresses; e.g., Google DNS servers (free to use), you only need two:
Code:
cat /etc/resolv.conf
search com
nameserver 8.8.8.8
nameserver 8.8.4.4
Look at your /etc/resolv.conf and see what's there (a local BIND service that... uh, isn't?)

How about the gateway address -- is it correct (or maybe some change took place)?

Also, if your systems are fixed IP, put their address and name (including the address and name of your local system) in /etc/hosts (but don't put any DHCP names and addresses in there; DHCP addresses change). For example,
Code:
cat /etc/hosts#
# hosts		This file describes a number of hostname-to-address
#		mappings for the TCP/IP subsystem.  It is mostly
#		used at boot time, when no name servers are running.
#		On small systems, this file can be used instead of a
#		"named" name server.  Just add the names, addresses
#		and any aliases to this file...
#
# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
# should NEVER be named with the name of the machine.  It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#

# For loopbacking.
127.0.0.1		localhost
192.168.1.10		fubar.com fubar
192.168.1.15		InkJet
192.168.1.20		snafu.com snafu
192.168.1.30		pita.com pita

# End of hosts.
That way, ssh, a browser, ping, whatever can find 'em quick (by the way, that InkJet entry is a H-P network printer).

Hope this helps some.

Last edited by tronayne; 08-28-2012 at 02:24 PM.
 
Old 08-28-2012, 02:48 PM   #3
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,450

Original Poster
Rep: Reputation: Disabled
Thanks for the ideas.

I'm using the 4.2.2.x nameservers. I don't think it's dns because it only happens when trying to access the one server. The access is across the WAN and the server has a changeable ip so /etc/hosts would not help.

Brian
 
Old 08-29-2012, 07:06 AM   #4
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 2,992

Rep: Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737
Have you tried ping or traceroute (or tcpdump or netstat)? One or the other ought to show you how you're getting to that sever and may give a hint. I would think that if you ping by name and it takes forever that it's a DNS problem. As you say, the server has a changeable IP address -- find out what it is "right now" and ping by that address and see what you get.

Really long delay times do sound like DNS -- if the first DNS server in your /etc/resovlv.conf list is having problems it can take quite a while before the second DNS server listed is tried. If you ping the first listed DNS server address and get horridly long time values, try the second listed server and see what happens and, if it's good, just swap them (or try a different DNS server altogether).

Something else to look at would be the same information on the laptop that doesn't display the problem; ping, traceroute, compare /etc/resolv.conf and /etc/rc.d/rc.inet1.conf. Do you get the same behavior if you're connecting to the outside world instead of that server?

What the heck, try a different cable or different router/switch port.

Hope this helps some.
 
Old 08-29-2012, 10:21 AM   #5
yenn
Member
 
Registered: Jan 2011
Location: Czech Republic
Distribution: Slackware, Gentoo
Posts: 152

Rep: Reputation: 21
Maybe you could try iperf, to check network capabilities. If you see noticeable low throughput, check cables, switches, routers, etc. on the way.
 
Old 08-30-2012, 08:24 AM   #6
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,450

Original Poster
Rep: Reputation: Disabled
Thanks for the ideas. I hope to be able to test them in the next couple of days. With regard to the DNS, I did change the servers in /etc/resolv.conf and there is no difference.

Brian
 
Old 08-30-2012, 05:39 PM   #7
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 314

Rep: Reputation: 77
Code:
dmesg
?
 
Old 08-31-2012, 10:24 AM   #8
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,450

Original Poster
Rep: Reputation: Disabled
I was able to test a few things...

It is not DNS. I have tried various DNS servers in /etc/resolv.conf and there is no change in the behavior.

traceroute gave the same results on both clients. I'm not sure what to look for with the netstat command.

The problematic client is a desktop so I can't easily test it on another network. I can't easily try a different router, either, because the one I am using is a Qwest DSL Modem/Router. I could add another router to the configuration but I can't eliminate that one.

Brian
 
Old 12-05-2012, 11:07 AM   #9
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,450

Original Poster
Rep: Reputation: Disabled
It's back again.

I never resolved this problem, but it went away by itself, so I dropped it. And the problem is still gone, for that computer. But for the past week or so another computer on the same network is having exactly the same problem.

To summarize:
Server is connected to a router connected to a cable modem. Client is on a different LAN, connected to the internet by a DSL modem/router.

After a period of dormancy, when the client connects to the server via http or ssh there is a significant lag before getting a response, sometimes a minute or more. After it does connect, response time for subsequent connections is normal until there is no activity for a period of time, say 5 minutes or so. Then the problem recurs. Other computers on the client LAN are not affected, and the affected client has no problems with other internet addresses.

One more thing, since the newly affected computer is a laptop I brought it to the server's LAN and there is no lag, even if I use the server's WAN address.

If anyone has any other ideas for me, I'd appreciate it.

Thanks,
Brian
 
Old 12-06-2012, 05:34 AM   #10
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 314

Rep: Reputation: 77
have a look with tcpdump
 
Old 12-06-2012, 09:03 AM   #11
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 2,992

Rep: Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737
Your problem looks, sounds and smells like DNS -- the machines don't know where to find one another. Too, because you say that that after a period of dormancy, it sounds like a DHCP lease has expired.

Something you may want to try is configuring things a little differently. Take a look at the post here http://www.linuxquestions.org/questi...9/#post4826521. The various servers' network information is in the configuration file (thus no need for a DNS look up -- that long delay just screams DNS).

Read though the post and see if it makes sense to you.

Hope this helps some.
 
Old 12-08-2012, 01:35 PM   #12
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,450

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tronayne View Post
Your problem looks, sounds and smells like DNS -- the machines don't know where to find one another. Too, because you say that that after a period of dormancy, it sounds like a DHCP lease has expired.

Something you may want to try is configuring things a little differently. Take a look at the post here http://www.linuxquestions.org/questi...9/#post4826521. The various servers' network information is in the configuration file (thus no need for a DNS look up -- that long delay just screams DNS).

Read though the post and see if it makes sense to you.

Hope this helps some.
I'm not sure how this applies to my situation. The server's WAN address is not fixed and I don't want to pay the extra money to do so. So I don't see how I could use /etc/hosts. With regard to dhcp, are you suggesting that there is a problem between the client and the client's router?

I've been trying to wrap my head around this one for a while.

Brian
 
Old 12-08-2012, 02:45 PM   #13
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 2,992

Rep: Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737
Something you might want to look into, just for grins if nothing else, is DynDNS (http://dyn.com/dns/) or a similar service.

You register one or more domains at DynDNS and install their software on you system that takes care of any IP changes that your providers make and the domains you've registered immediately are switched to the new IP address at the DLS or cable modem. I've used it for years with a DSL modem with less than zero problems. You don't have to fiddle with your routers, you don't have to fiddle with the modem, it all happens automagically on the individual servers when the IP address changes for whatever reason.

Now, they used to have a free service (I don't know if they still do) but at a minimum of $15 a year, you essentially get a fixed IP address that the outside world can get to (which would be the servers you're having the problems with). It'll do a nice job with machines at separate locations or, for that matter, any machine connected to a public network somewhere or other that you can SSH into, get to a web page and all the other stuff you'd like to do. Look around on their site for the free version (if it's still there, that is).

It's about the cheapest way I know of to deal with the shifting IP addresses problem with your ISPs.

Might be worth a look-see.

Hope this helps some.
 
Old 12-11-2012, 06:18 PM   #14
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,450

Original Poster
Rep: Reputation: Disabled
I'm actually using freedns.afraid.org for the management of the dynamic WAN address at the server network.

Brian
 
Old 12-11-2012, 06:22 PM   #15
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,450

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Celyr View Post
have a look with tcpdump
Could you elaborate? I'm not familiar with the tool and I'm not sure what I would be looking for.

Brian
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer slow in response while playing Amarok TigerLinux Linux - Software 12 02-19-2011 06:48 AM
Server become very slow in response cdestiny Linux - General 3 10-29-2008 12:05 PM
X server slow response when connected to slow Wifi bluesmanu Linux - Software 0 04-09-2008 06:56 AM
Slow response from server mheymann Linux - Networking 6 02-06-2006 08:35 AM
Slow response from MySQL on other server sarmadys Linux - Networking 3 11-03-2005 11:12 AM


All times are GMT -5. The time now is 10:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration