AardvarkBusiness.net - Business Search Engine AardvarkBusiness.net - Business Search Engine



 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

     

Please assess my server (Apache) configuration

 
 
Post new topic   Reply to topic    AardvarkBusiness.net Forum Index -> Domains & Hosting Forum
View previous topic :: View next topic  
Author Message
foundThroughAdminSig
President
President


Joined: 24 Apr 2004
Posts: 6491

7611 ants

PostPosted: Sat Dec 24, 2005 9:01 pm    Post subject: Please assess my server (Apache) configuration Reply with quote

I have been having problems on my web server (Apache). I did a few things to address problems, but I'm guessing that the server is not configured right (given hardware and workload). The following is my server configuration, a copy of httpd.conf. Please assess and let me know what changes I should make. More specifically, I'd like to know if the configuration can make Apache lock up or hang; if so, I need to make changes in order not to let that happen.

Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
_________________
Online Education :: Training Forum
Chat about health ... Finance Books
Back to top
View user's profile Send private message Visit poster's website
trev
President
President


Joined: 15 Oct 2002
Posts: 3011
Location: NW England, UK
4037 ants

PostPosted: Sat Dec 24, 2005 11:03 pm    Post subject: Reply with quote

While we're waiting for someone who actually knows what all that stuff means to come along, I was looking at the config of our servers which have a range of hardware and they all seem to be roughly the same.

First bits are the same as yours. Second bits are as follows:

StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 160
MaxRequestsPerChild 0

The MaxClients might be allowing the server to go pretty balistic - if I'm reading the docs correctly - before closing any further connections.

Apache on our servers stops working usually a couple of times week at most, although thats on the server hosting about 150 or so sites (also happens to be the slowest). The others might be once a month.

Trev
_________________
Mad Theories - Ambleside - Coniston - Grange
Back to top
View user's profile Send private message Visit poster's website
foundThroughAdminSig
President
President


Joined: 24 Apr 2004
Posts: 6491

7611 ants

PostPosted: Sat Dec 24, 2005 11:35 pm    Post subject: Reply with quote

Trev wrote:
The MaxClients might be allowing the server to go pretty balistic - if I'm reading the docs correctly - before closing any further connections.

Trev

Maybe I should bring down the number. Maybe ...

I need to mention another thing. The following is a copy of error messages in error_log:

[Fri Dec 23 15:40:46 2005] [error] Cannot configure connection "ooen_net_Connection"
[Fri Dec 23 15:40:47 2005] [error] Cannot read packet (//home/builder/pb_work_dir/psa_aiconfig_7.5.3/psa/apache-modules/mod_webapp/work/jakarta-tomcat-connectors-4.1.29-src/webapp/lib/pr_warp_config.c:230)
[Fri Dec 23 15:40:47 2005] [error] Cannot configure connection "ooen_net_Connection_ssl"
[Fri Dec 23 15:40:47 2005] [error] Cannot read packet (//home/builder/pb_work_dir/psa_aiconfig_7.5.3/psa/apache-modules/mod_webapp/work/jakarta-tomcat-connectors-4.1.29-src/webapp/lib/pr_warp_config.c:230)
[Fri Dec 23 15:40:47 2005] [error] Cannot configure connection "ooen_net_Connection_ssl"
[Fri Dec 23 15:40:48 2005] [error] Cannot read packet (//home/builder/pb_work_dir/psa_aiconfig_7.5.3/psa/apache-modules/mod_webapp/work/jakarta-tomcat-connectors-4.1.29-src/webapp/lib/pr_warp_config.c:230)
[Fri Dec 23 15:40:48 2005] [error] Cannot configure connection "ooen_net_Connection_ssl"
[Fri Dec 23 15:40:48 2005] [error] Cannot read packet (//home/builder/pb_work_dir/psa_aiconfig_7.5.3/psa/apache-modules/mod_webapp/work/jakarta-tomcat-connectors-4.1.29-src/webapp/lib/pr_warp_config.c:230)
[Fri Dec 23 15:40:48 2005] [error] Cannot configure connection "ooen_net_Connection_ssl"
[Fri Dec 23 15:40:49 2005] [error] Cannot read packet (//home/builder/pb_work_dir/psa_aiconfig_7.5.3/psa/apache-modules/mod_webapp/work/jakarta-tomcat-connectors-4.1.29-src/webapp/lib/pr_warp_config.c:230)
[Fri Dec 23 15:40:49 2005] [error] Cannot configure connection "ooen_net_Connection_ssl"
[Fri Dec 23 15:40:49 2005] [error] Cannot read packet (//home/builder/pb_work_dir/psa_aiconfig_7.5.3/psa/apache-modules/mod_webapp/work/jakarta-tomcat-connectors-4.1.29-src/webapp/lib/pr_warp_config.c:230)
[Fri Dec 23 15:40:49 2005] [error] Cannot configure connection ooen_net_Connection
[Fri Dec 23 15:40:50 2005] [error] Cannot read packet (//home/builder/pb_work_dir/psa_aiconfig_7.5.3/psa/apache-modules/mod_webapp/work/jakarta-tomcat-connectors-4.1.29-src/webapp/lib/pr_warp_config.c:230)
[Fri Dec 23 15:40:50 2005] [error] Cannot configure connection "ooen_net_Connection"
[Fri Dec 23 15:40:51 2005] [error] Cannot read packet (//home/builder/pb_work_dir/psa_aiconfig_7.5.3/psa/apache-modules/mod_webapp/work/jakarta-tomcat-connectors-4.1.29-src/webapp/lib/pr_warp_config.c:230)
[Fri Dec 23 15:40:51 2005] [error] Cannot configure connection ooen_net_Connection
[Fri Dec 23 15:40:51 2005] [error] Cannot read packet (//home/builder/pb_work_dir/psa_aiconfig_7.5.3/psa/apache-modules/mod_webapp/work/jakarta-tomcat-connectors-4.1.29-src/webapp/lib/pr_warp_config.c:230)
[Fri Dec 23 15:40:51 2005] [error] Cannot configure connection "ooen_net_Connection"

I'm wondering if Apache's not being able to connect to Tomcat increases workload and it can cause Apache to lock up or hang.
_________________
Online Education :: Training Forum
Chat about health ... Finance Books
Back to top
View user's profile Send private message Visit poster's website
foundThroughAdminSig
President
President


Joined: 24 Apr 2004
Posts: 6491

7611 ants

PostPosted: Tue Dec 27, 2005 4:07 am    Post subject: Reply with quote

The problem happened again, but I ran the following commands this time and took screenshots.

top (Screenshots is here)
ps -aux (Screenshots is here)
ps -ef (Screenshots is here)
ps -ax | grep httpd (while Apache was hanging) (Screenshots is here)
ps -ax | grep httpd (after Apache restarted) (Screenshots is here)

Is there any information that you can extract from this? If so, what can you figure from these? If not, how should I diagnose the problem next time? What extra information do I need to obtain in order to find the cause?
_________________
Online Education :: Training Forum
Chat about health ... Finance Books
Back to top
View user's profile Send private message Visit poster's website
trev
President
President


Joined: 15 Oct 2002
Posts: 3011
Location: NW England, UK
4037 ants

PostPosted: Tue Dec 27, 2005 5:47 pm    Post subject: Reply with quote

To be honest, you're way outside my knowledge base there as I've no idea how Tomcat intereacts with Apache and such like. Thinking about Java programming just makes my brain hurt. Hopefully there might be someone who can give you a clue.

From whats shown in the screenshot running TOP there doesn't appear to be anything loading the server at all so perhaps you just need to reduce your numbers in the httpd.conf file to closer to what our servers run on. Not 100% sure if it would really help, but it might....possibly. Also, do you need to run Tomcat as that appears to be causing the trouble?

On the other hand, if you don't have a lot of web sites, do you really need your own server? Wouldn't it be easier to just put it onto a shared one and let the hosting people worry about it going wrong?

Trev
_________________
Mad Theories - Ambleside - Coniston - Grange
Back to top
View user's profile Send private message Visit poster's website
foundThroughAdminSig
President
President


Joined: 24 Apr 2004
Posts: 6491

7611 ants

PostPosted: Tue Dec 27, 2005 6:27 pm    Post subject: Reply with quote

Trev wrote:
From whats shown in the screenshot running TOP there doesn't appear to be anything loading the server at all so perhaps you just need to reduce your numbers in the httpd.conf file to closer to what our servers run on. Not 100% sure if it would really help, but it might....possibly. Also, do you need to run Tomcat as that appears to be causing the trouble?

I showed screenshots to a couple of people over a period of time, and no one was able to pinpoint the problem. A tech support at my host company also checked stats upon Apache's hanging, but he/she couldn't really find anything in particular.
Trev wrote:

On the other hand, if you don't have a lot of web sites, do you really need your own server? Wouldn't it be easier to just put it onto a shared one and let the hosting people worry about it going wrong?

Trev

Tomcat uses a lot of memory and it needs to have its own set up in many cases. So, this often makes it ideal if you just get a dedicated box instead of getting a shared hosting solution. It's one of reasons why I have a dedicated box. I know that it costs a lot more, but I currently host about 11 domains, so I'm making pretty good use of it.

Going back to the original topic, I looked for related information and also looked for information about Apache2's hanging. Apparently it does happen in some cases, and it does not necessarily relate to Tomcat. One of modules installed auth_digest_module can cause a problem apparently, this is what I'm testing now.

http://forums.gentoo.org/viewtopic-t-151105-highlight-authdigestmodule.html
_________________
Online Education :: Training Forum
Chat about health ... Finance Books
Back to top
View user's profile Send private message Visit poster's website
trev
President
President


Joined: 15 Oct 2002
Posts: 3011
Location: NW England, UK
4037 ants

PostPosted: Tue Dec 27, 2005 6:54 pm    Post subject: Reply with quote

11 domains on a dedicated box??

Just looking at ours and Aaron has 249 web sites, Abi has 46 and Amy (the most powerful) has 50 - hmm, maybe not quite got these spread like we should have. Smile

I can imagine Java taking a lot of memory considering what it does when you try to run Java applets on a computer. Also is Apache 2 fully developed yet? I keep hearing reports that it's fine for real world use and others stating that it's not really ready.

Trev
_________________
Mad Theories - Ambleside - Coniston - Grange
Back to top
View user's profile Send private message Visit poster's website
foundThroughAdminSig
President
President


Joined: 24 Apr 2004
Posts: 6491

7611 ants

PostPosted: Tue Dec 27, 2005 7:02 pm    Post subject: Reply with quote

Trev wrote:
11 domains on a dedicated box??

Just looking at ours and Aaron has 249 web sites, Abi has 46 and Amy (the most powerful) has 50 - hmm, maybe not quite got these spread like we should have. Smile

I need to make many more websites obviously ...
Trev wrote:

I can imagine Java taking a lot of memory considering what it does when you try to run Java applets on a computer. Also is Apache 2 fully developed yet? I keep hearing reports that it's fine for real world use and others stating that it's not really ready.

Trev

I think it's ready for production, but I'm guessing that, when you run a super critical operation (like monitoring oil refinery or checking someone's heart), you probably want to just stick to Apache1. It's not mandatory to use Apache2.
_________________
Online Education :: Training Forum
Chat about health ... Finance Books
Back to top
View user's profile Send private message Visit poster's website
MassDebation
Executive
Executive


Joined: 20 Nov 2005
Posts: 105

120 ants

PostPosted: Sat Dec 31, 2005 1:51 pm    Post subject: Reply with quote

I also think it's probably best to stick with Apache 1 for mission-critical. Although I havent had any issues with Apache 2 yet, I also don't have any real load to test it... so I'm not really one to judge here.
_________________
WebWobot Search Engine | Search Engine forums | Link, Banner and Article Exchange
Back to top
View user's profile Send private message Visit poster's website
foundThroughAdminSig
President
President


Joined: 24 Apr 2004
Posts: 6491

7611 ants

PostPosted: Sat Dec 31, 2005 7:58 pm    Post subject: Reply with quote

MassDebation wrote:
I also think it's probably best to stick with Apache 1 for mission-critical. Although I havent had any issues with Apache 2 yet, I also don't have any real load to test it... so I'm not really one to judge here.

FYI, I have been working with someone who has a very similar problem (on some message board), and he's using Apache2 as well.
_________________
Online Education :: Training Forum
Chat about health ... Finance Books
Back to top
View user's profile Send private message Visit poster's website
MassDebation
Executive
Executive


Joined: 20 Nov 2005
Posts: 105

120 ants

PostPosted: Sat Dec 31, 2005 8:38 pm    Post subject: Reply with quote

Do you think it's an Apache2 problem then? I mean, what about just going back to Apache 1 and seeing how things pan out for a while?
_________________
WebWobot Search Engine | Search Engine forums | Link, Banner and Article Exchange
Back to top
View user's profile Send private message Visit poster's website
foundThroughAdminSig
President
President


Joined: 24 Apr 2004
Posts: 6491

7611 ants

PostPosted: Sat Dec 31, 2005 8:58 pm    Post subject: Reply with quote

One of problems is this. I'm using Plesk 7.5.x and Apache2 comes with it; it's a part of Plesk 7.5.x package. So, if I were to switch from Apache2 to Apache, I'd be customizing. Once I customize, there will be other problems (most likely). This is one of reasons why I do not consider switching from Apache2 to Apache.
_________________
Online Education :: Training Forum
Chat about health ... Finance Books
Back to top
View user's profile Send private message Visit poster's website
MassDebation
Executive
Executive


Joined: 20 Nov 2005
Posts: 105

120 ants

PostPosted: Sat Dec 31, 2005 9:11 pm    Post subject: Reply with quote

Ah, I see. I don't know Plesk at all, but just a question: Is Plesk incompatible with Apache then?
_________________
WebWobot Search Engine | Search Engine forums | Link, Banner and Article Exchange
Back to top
View user's profile Send private message Visit poster's website
foundThroughAdminSig
President
President


Joined: 24 Apr 2004
Posts: 6491

7611 ants

PostPosted: Sat Dec 31, 2005 10:34 pm    Post subject: Reply with quote

MassDebation wrote:
Ah, I see. I don't know Plesk at all, but just a question: Is Plesk incompatible with Apache then?

I don't think so, but the current version of Plesk is designed to configure Apache2 from the control panel. You configure Apache and Apache2 slightly differently, so just switching from Apache2 to Apache will probably break configuration.
_________________
Online Education :: Training Forum
Chat about health ... Finance Books
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AardvarkBusiness.net Forum Index -> Domains & Hosting Forum All times are GMT + 1 Hour
Page 1 of 1

 
Google
 
Business Forum Sport Forum Travel Forum


Powered by php B B © 2001, 2002 php B B Group

AardvarkBusiness.net Business Search Engine & Directory