2

I'm running a large EC2 instance with ubuntu that is basically used to provide email services (IMAP, webmail access, etc) to some people.

This server was previously hosted somewhere else but was moved to AWS because we needed a better performance, the problem is that it nevers works ok.

The usage of resources in the instance are very low (we have plenty of free RAM, disk space, minimum CPU usage, etc), nevertheless it takes a VERY long time to connect to the instance via SSH (around 2 minutes to connect). After logging in, executing 'sudo su -' takes another 2 minutes to complete. After that, I don't experience any delay working on the opened shell.

Also, making a webmail connection (I'm using Squirrelmail) is extremely slow; the same for connecting to the IMAP server.

I thought that the problem could be a DNS issue, so I've added 'UseDNS=no' in /etc/ssh/sshd_config, installed a local caching webserver (using dnsmasq package), and added al reverse DNS records of the domain but I still having the same problems, so I think my guess is wrong.

Has anybody got any suggestion about the possible cause of this behaviour? Any clue will be much appreciated.

Thanks!

  • check iostat to see if everything ok with the file system, Also you can try to disable IPv6 for that communication. DNS you can check if you put the ip of AWS in your client /etc/hosts. or you can try ssh directly to the ip addr of the instance and see if it is any faster. – Danila Ladner Apr 30 '13 at 14:11
  • DNS issues shouldn't affect sudo su command. Are you sure it's not your computer that's the offending party (could it have a virus on it or other issues?). Also could your server have a virus on it? Do any commands run fast on your server? What about an "ls" command. What happens if you reboot? Is this a fresh EC2...Was it ever fast? What have you done since? – Drew Khoury May 1 '13 at 5:10
  • I'm sure it's not a virus in my computer (it only happens with that server and I'm connecting from a linux desktop). All other commands run well. BTW, all the people that have an email account is complaining about slow login time, so it's not just me. – tvs May 1 '13 at 6:29
  • Also, I've followed Danila's suggestions (disabled IPv6, trying to connect using IP instead of hostname, etc) but the problem remains – tvs May 1 '13 at 6:31
2

I found the problem. It was a misconfigured NIS service that has been interfering with everything else; I've stopped and disabled the service (was not really needed) and everything works ok now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.