Jump to content

Apache Connection Problems


dcool

Recommended Posts

I'm having problems with Apache at peak times on my server. When the server is at peak im using about 40% of my cpu. The problem is when I go to one or any of my domains during peak hours it keep thinking and will do nothing and return nothing after a few seconds. If I refresh the page while it's doing it the page loads fast like it should. It doesn't do it all the time. I'm using Apache virtual host for my domains. When I run "lynx http://localhost/server-status" at peak there is about 500 request currently being processed. I also run "netstat -plan | grep :80 | wc -l" at peak and around 25000+. I know it's a very busy server as I host stuff through JavaScript but the sizes are just bytes. I been messing with this for over 3 weeks I can't figure it out.

 

 

Server Info

 

OS: Ubuntu Linux 11.10

CPU: Intel® Xeon® CPU X5550 @ 2.67GHz, 8 cores

Ram: 12GB

Kernel and CPU: Linux 3.0.0-13-server on x86_64

Apache2 verison: 2.2.20 (Ubuntu)

Php Version: 5.3.6-13ubuntu3.2

Mysql Version: 5.1.58 (Has Been runing fine)

 

I have changed in apache2.conf

 

Timeout 30

KeepAlive Off

MaxKeepAliveRequests 0

KeepAliveTimeout 60

 

<IfModule mpm_prefork_module>

    ServerLimit        2000

    StartServers        500

    MinSpareServers      100

    MaxSpareServers      200

    MaxClients          2000

    MaxRequestsPerChild  0

</IfModule>

 

What my virtual domain looks like in /etc/apache2/sites-available

 

Example for all my domains.

 

<VirtualHost *:80>

    ServerName example.com

    ServerAlias www.example.com

    DocumentRoot "/home/example"

    DirectoryIndex index.php

</VirtualHost>

 

I will provide and additional information if needed that's what I can think off of the top of my head you will need. I do not have any performance problems when the domain loads and it loads quick. I'm not sure what else to check or change. Thanks

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.