apache problem

Discussion in 'Apache' started by marketmaker, Nov 5, 2008.

  1. #1
    hi,
    i set up an apache web server (windows platform)
    and meet a problem, now it has 4 domain in it and all the web app is a light one, not some sort of complicated and heavy web app, but the apache always responds so slow now...
    any idea what's wrong with my server?and it happens only when daylight when people access the web a lot..
    is it got something to do with the connection limit?
    anyone can help?
    anyway i'm a newbie,

    thx anyway
     
    marketmaker, Nov 5, 2008 IP
  2. javaongsan

    javaongsan Well-Known Member

    Messages:
    1,054
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #2
    "windows platform" thats your problem. Get a linux host
     
    javaongsan, Nov 5, 2008 IP
  3. marketmaker

    marketmaker Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    oh ok, thank you very much for your info javaongsan
    btw just for knowledge, i also often got this message lately
    connection to domain.com failed (actively refused by the server)
    what does it mean?my apache is still running, and it also can't be accessed through the server machine

    and if i can not move the server because the all the mysql data is there and it may not be accessed remotely, is there any way to help the server?

    thx
     
    marketmaker, Nov 5, 2008 IP
  4. Ladadadada

    Ladadadada Peon

    Messages:
    382
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #4
    There are thousands of things that could be causing the problem and we could sit here guessing at them for years. ("Windows platform" could be the problem but it's much more likely to be something else. I'm more familiar with Linux so I would find it much easier to track down the problem on a Linux machine.)

    What I would recommend is starting to narrow down the possibilities of what could be causing the slowness.

    Firstly, how are you measuring it ? Are you requesting the home page of your site in a browser or are you using a site performance tool ?

    The Firefox plugin YSlow is great for determining why your site is perceived as slow. It will give you hints in a variety of different areas that it has identified where you site is slow.

    After you have implemented what it suggests, if it is still slow then start looking at your database. This is the most common cause of slow sites.

    Check CPU usage, disk usage and network bandwidth usage. Any one of these could be a bottleneck that causes your application to go slow. Make sure you know what the upper limits for each of these measurements is.

    Next, look at what plugins and options you have enabled on whatever web application you are using. This may be highlighted by the database work above as plugins that are slow are usually slow due to badly written database queries. Occasionally they are slow for other reasons like DNS lookups and requesting pages from other sites but mostly it's database queries.

    Lastly, start looking at your Apache config. Values like MaxChildren and MaxRequestsPerChild can cause unnecessary load if they are set to the wrong value. Look at how many children your Apache spawns and how often it kills off old ones and starts new ones. These values only start to matter if you have a lot of traffic. If MaxChildren is 256 and most pages are delivered in 4 seconds then you will need around 256 requests every 4 seconds for this value to make a difference. This probably means around 50 visits (each visit makes around 5 requests) every 4 seconds which is 750 visits every minute which is 45,000 visits every hour. Do the same calculation for your site (based on how long each page takes to serve and the value of MaxChildren in your server) to figure out how much traffic you need before MaxChildren starts to make a difference.
     
    Ladadadada, Nov 5, 2008 IP
  5. marketmaker

    marketmaker Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    oh ok ladadadada, i'll check it first
    btw is this okay?

    
    <VirtualHost *:80>
    	ServerAdmin admin@domain.com
    	DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/domain.com"
    	ServerName domain.loc
    	ServerAlias www.domain.com domain.com
    </VirtualHost>
    
    <VirtualHost *:80>
    	ServerAdmin admin@domain.com
    	DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/report.com"
    	ServerName report.loc
    	ServerAlias 203.xxx.xxx.xxx
    </VirtualHost>
    
    PHP:
     
    marketmaker, Nov 7, 2008 IP
  6. vovaNux

    vovaNux Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Seems to be OK. What's in your logs?
     
    vovaNux, Nov 12, 2008 IP