LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-29-2007, 03:59 PM   #1
SPGWhistler
LQ Newbie
 
Registered: Feb 2007
Location: Muskegon, Michigan, United States
Distribution: Fedora Core 4
Posts: 7

Rep: Reputation: 0
can't login via ssh when apache is under heavy load


I have a dedicated web server that his hosted by hostdime.net. It is fully managed, so when I had this latest problem, I went to their tech support hoping to get an answer, but their resolution summed it up with "Your server is configured correctly, and there are not settings that can be changed to solve this issue."

The Problem:
A few days ago, we experienced a very heavy load on our server due to a sale that started at exactly noon. So, we were getting thousands of hits all at once. Two things happened: 1 - My web site was unresponsive for the duration of the hits, and 2 - I could not log in via SSH for the duration of the hits. As soon as the traffic slowed down, I was able to log in again. I could get as far as "Last Login on XXX..." but that is it. A prompt would never show up.

I understand the website being unresponsive during a heavy load. That makes sense to me.

What I don't understand is why I couldn't log in via SSH. I mean, I understand that a high load causes sshd to respond slowly, which prevents the log in, but from my understanding of linux, there should be some setting that I can change to make sshd have a higher cpu priority than apache. Or, perhaps I could change apache's resource limits to make it only use x% of the cpu. Is this not correct? Tech support said there was no such setting.

What I want:
I do not want apache to suffer performance issues because of it, but I want sshd to have a higher cpu priority than apache so that I can login - even under high server loads.

I know that you can change a thread's priority level, but I don't know if that is what I want or not.

Any help in this area would be greatly appreciated.

Ps.
Shouldn't apache be fairly responsive, even under a fairly high load of thousands of hits per second? I mean, of course the way the web site is written will dictate this, but normally, shouldn't apache be able to handle thousands of hits per second and still be fairly responsive?

Thanks in advance for all the help!
 
Old 03-30-2007, 09:23 AM   #2
edenCC
Member
 
Registered: May 2006
Location: Gz,China
Distribution: RH,FB
Posts: 196
Blog Entries: 1

Rep: Reputation: 32
how about the avg. load during the high hits?
and how along are you waiting during the login?


Quote:
Originally Posted by SPGWhistler
...

I know that you can change a thread's priority level, but I don't know if that is what I want or not.

Any help in this area would be greatly appreciated.

Ps.
Shouldn't apache be fairly responsive, even under a fairly high load of thousands of hits per second? I mean, of course the way the web site is written will dictate this, but normally, shouldn't apache be able to handle thousands of hits per second and still be fairly responsive?

Thanks in advance for all the help!
you can get details from /etc/security/limits.conf if the box is redhat series. the cpu & mem limit based on user account and user groups, it's better to specify a normal account for apache to deploy the limitation.
But i think `nice' will be a good choice if you are sure that the long delay of login was not caused by the network outgoing/ingoing traffic.

I think, EVEN IF your web page is totally static html, a x86 based normal blade server cannot suffer from thousands of hits per second.
 
Old 03-31-2007, 05:05 AM   #3
SPGWhistler
LQ Newbie
 
Registered: Feb 2007
Location: Muskegon, Michigan, United States
Distribution: Fedora Core 4
Posts: 7

Original Poster
Rep: Reputation: 0
I am not an advanced linux user, so forgive me if I sound stupid here, but I'm not sure how I can get the exact cpu and memory usage during the high traffic time - but when I did a TOP, the cpu was about 90% and I don't know how much memory was used.

But I see what your saying with the limits.conf file... and my apache server runs as nobody, and my ssh daemon runs as root, so I should add some lines like:
nobody soft nice VALUE
nobody hard nice VALUE

But what should the VALUEs be?

Also, do I have to reboot to make these settings take effect, or will a simple apache restart do the trick?

Thanks again.
 
  


Reply

Tags
apache, high, load, log, login, priority, ssh, sshd


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
Bonobo - heavy load on CPU ColonelPanic Linux - Software 0 06-15-2006 09:56 AM
Apache heavy CPU load bretticus Linux - Networking 0 06-11-2005 03:49 PM
azureus - heavy harddrive load sonaatti Linux - Software 2 04-11-2005 06:59 AM
Xfree heavy load NetScripter Linux - Software 4 01-25-2004 05:27 AM
System very choppy while under heavy i/o load devhen Linux - General 3 09-30-2003 05:25 PM


All times are GMT -5. The time now is 04:51 PM.

Main Menu
Advertisement
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