How To Optimize Apache

Jul 14, 2008

I have purchased "Due2Core" with 4GB Ram. i have one problem. i hope someone help me in this matter.

I have hosted only 4 or 5 websites on dedicated. mostly maximum 8000 users visit my website. Maximum B/W usage is 35GB.

Daily 25 or 30 mints my websites "WebPages open speed slow". Some time problem occur for 1 time or 2 times. when i checked my server status report Load only 0.50% and Memory usage 35% only.

when i checked server and my sql usage report maximum http load come from my top visit websites.

some friend suggest me for optimize your dedicated apache. because some thing wrong in your apache.

because i have enough memory.

Anybody suggest me suitable apache Optimization method. with step by step.

Remember, in this time my server run default sitting.

View 13 Replies


ADVERTISEMENT

Apache Optimize

Aug 7, 2007

I've been a long time follower of wht.com from reading the hosting reviews to optimizations, and now it's come to that point that I need to post a question to get more accurate help than reading others configurations since all servers and sites have their needs. So here it goes.

Server specs:

Ubuntu dapper
Apache 2.2.4
PHP 5.2.3 - eaccelerator 0.9.5.1
mysql 5.0.22
2.6.15-28-server #1 SMP i686 GNU/Linux
cpu: Intel Xeon-Clovertown 5320-QuadCore 1.86GHz
ram: 2x2GB

As I wrote in the topic my main concern is my apache config. I've tried many many different configs but I'm never sure when to stop optimizing it.
The site is a chat community (myspace like site) with over 1000-2000 simultaneous users online that do everything from posting images, to talk in the forums. And yes I host everything on the same server atm.

My worry is that at night when the site has the most visitors the amount of processes that get produced get 'cut' as it seems to reach a limit somewhere. Below is an image of cacti with load and processes. Please ignore the load peaks as they are nothing then my average 'testing' periods of new functions

[url]

This seems to be run by my Max/MinSpareServers which I've played around with but as I said never could find a perfect spot. The amount of processes have always been controled by these values, before I increased them a couple of days ago the amount was around 600 processes to the max. Now as you can see on the latest graph it's around 800.

I've tried the default values but the site went to slow with those values. I've lately come up to what I think is insane values but it keeps the server ticking in a nice pace.

So I'm asking you guys for help as I've reached my trial and error sessions. I have no clue what 'ok' values are for amount of current processes running, and I don't' feel confident to increase the values.

here is my apache config.

Timeout 60
KeepAlive On
MaxKeepAliveRequests 3500
KeepAliveTimeout 2

StartServers 190
MinSpareServers 170
MaxSpareServers 230
ServerLimit 700
MaxClients 700
MaxRequestsPerChild 6000

View 13 Replies View Related

Optimize Apache

Mar 2, 2007

My server: Opteron 165 + 2GB RAM, running CentOS

I have noticed that if I enable KeepAlive, the performance is much more better. However, Apache will be frozen few times a day without any reason. So, I need to turn off KeepAlive. Is there any idea why and how to fix? This is the configuration

Timeout 300
KeepAlive On
MaxKeepAliveRequests 10
KeepAliveTimeout 2
MinSpareServers 10
MaxSpareServers 25
StartServers 15
MaxClients 250
MaxRequestsPerChild 10

View 7 Replies View Related

Optimize Apache

Feb 14, 2007

I bought a new server to run proxy websites on it.

how to optimize my apache.

View 10 Replies View Related

Tools To Optimize Apache & PHP

Apr 8, 2009

There are some great tools to optimize MySQL, however I have not been able to find the equivalent for Apache + PHP. I have a lot of experience tweaking these two in extreme traffic environments, but there is no beating a program that can simultaneously evaluate several inputs over time to calculate optimal settings.

View 11 Replies View Related

How To Optimize The The Mysql

Aug 3, 2009

in Optimizing mysql Why because i am facing the high server load because of the mysql often

View 4 Replies View Related

How To Run OPTIMIZE TABLE

Mar 25, 2009

Today i need to run "OPTIMIZE TABLE" from MySQLTuner recommendation.

Now i don't know how to run it ? I try to put in SQL Query via phpmyadmin and:

SQL query:

OPTIMIZE TABLE

MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

View 5 Replies View Related

How Can I Optimize My Mysql

Feb 23, 2008

my server has some forums on it,

and it need mysql with php to run,

i want to optimize the mysql to get better performance,

how can i check it my setting is ok and how can i do?

View 9 Replies View Related

How Can I Optimize The Httpd

Mar 4, 2008

i have two servers behind certain switch,

the two servers are with low load,

but the one is good response,and another one is slow,

i try to restart the httpd,the problem is here still,

are there any method that i can optimize the httpd and check out why it is ?

they all run with whm/cpanel

View 4 Replies View Related

What Exactly Is Optimize MySQL

Mar 30, 2007

Saw a few mention of optimizing mysql. Sounds like it will help with performance. What exactly is this and will my web host do this for us?

View 3 Replies View Related

Optimize MySQL

Feb 19, 2008

I recently got my first dedicated server and now have it all up and running. I would like to optimize mySQL for improved performance.

Server running: CentOS 5, Tomcat, mySQL 5

Most queries: Single line queries (SELECT * FROM table WHERE name='John')
NOTE: Most of my queries include the return of at least one blob (size range 100kb to 1Mb)

Server Specs: Dual Core Intel Pentium 3Ghz, 4GB RAM, 500Gb hard disk

Below is my current my.cnf file:

Code:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
max_allowed_packet=16M
skip-innodb
skip-bdb

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

I've looked through the mySQL documentation but there is no substitute for experience when it comes to these things.

View 6 Replies View Related

MySql Optimize

Aug 4, 2007

to optimize mysql for my server. What would the cost be?

View 14 Replies View Related

How Can I Optimize My Old Home For Hosting Use

Jun 8, 2009

I have my old house of 330 Sq. feet. No one is living there.

How can I use if for hosting purpose or something like that ?

Its on First floor of well Cement Concrete Building.

No water leakage , no electricity problems.

Can I use this space for hosting purpose or something like collocation facility ?

Is yes, what is needed ?

I know -

Backup Generators

HVAC cooling system

View 14 Replies View Related

Optimize Memory/CPU Usage

Mar 16, 2009

I have a VPS w/ KnownHost on CPanel and 256mb of RAM (I know, bad mix). It's the newer CPanel that is VPS optimized.

There are 3 websites on it and get < 500 hits/day total on average.

Right now I am at 128mb used/127mb free. It seems higher than it should/needs to be.

View 7 Replies View Related

Optimize Thttpd Web Server

Mar 12, 2008

How can I get optimal performance from thttpd web server (optimized configuration)? We are serving only images from this.

View 0 Replies View Related

Optimize Httpd.conf

Nov 19, 2007

I am running Plesk 8 Server, RH Linux EL4 3.0GHz 1GB Ram. My httpd.conf setting is as below:

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 150
MaxRequestsPerChild 1000
</IfModule>

best optimized values for my server. My server oftenly goes down due to large number of http processes.

View 4 Replies View Related

Optimize Dedicated Server

Jun 8, 2007

How would I know how to optimize my server's apache's and mysql's config files?

Could I just up all of the limits?

View 5 Replies View Related

Optimize Lighttpd For Large File

Apr 14, 2009

So I've recently ordered a Supermicro 4U server with 24x1TB HDs, 64GB RAM and put it in RAID 10. I'm running Debian 5.0 and have installed lighttpd. All the content I serve are video files (AVi, MP4, MKV, OGM) and each file is about 100-500mb in size. I'm wondering how can I optimize lighttpd to get the best performance out of it. I look forward to your replies.

View 14 Replies View Related

Optimize MySQL Config For 768MB Of RAM

Apr 4, 2009

I have got a cPanel/WHM VPS with 768MB of RAM and am running MySQL 5.0.67-community

Can someone tell my what to put in it, or give me some tips on how to optimize MySQL

This is what I have in /etc/my.cnf right now:

Code:
[mysqld]
skip-bdb
skip-innodb

View 0 Replies View Related

Optimize All Tables In A MySQL Database

Oct 29, 2008

how exactly it helps?

mysqlcheck -o -u...

Like what it does to "optimize" them? Does it really help?

View 7 Replies View Related

Scripts To Optimize Mysql Configuration

Sep 21, 2007

Would there be any scripts that can optimize a Mysql configuration?

I remember seeing one but I forgot the name and lost the script

View 2 Replies View Related

Optimize Server For Playing FLV (Flash) Videos

Jun 18, 2008

how to optimize a server for playing flash videos?

Here is our website: operationsports.com

In the right menu you'll notice an embedded flash video player.

Often, we receive complaints that our videos are buffering slowly at the beginning causing the movie to stop/pause for a few seconds. After this pause the remainder of the video buffers lightening quick.

I'd like to remove the pause if possible.

The server is a dual processor linux based server dedicated entirely to our video files.

It has plenty of power.

how to optimize a server for playing flash videos smoothly?

View 3 Replies View Related

Check My Mysql Config - Optimize Or Upgrade

Mar 17, 2008

we've currently got a 2 server setup, apache+mysql

Mysql server is a Xeon 3.2Ghz with 2Gb ram, scsi 73gb raid1 disks

Server has been running a while, steadily increasing in traffic. whilst 90% of the time it's running ok (load around 0.5 - 1.0, cpu around 25-50% busy mainly mysql, disk i/o around 3% busy) during heavy traffic times everything slows right down

At the moment the mysql box is only running mysql so we've allocated about 1.5gb out of the 2gb to mysql.

At present, when we get busy the apache server is queing up requests as it waits for the mysql server. Query log shows most queries are <1sec, any other's are being optimised but due to the nature of our website there are a few pesky queries (only occasionally being slow though).

question is, can this config be tuned any more or is it time for an upgrade - mainly ram to add more innodb buffers?

Here's the result of tuning-primer.sh

Code:
SLOW QUERIES
The slow query log is enabled.
Current long_query_time = 2 sec.
You have 9 out of 159346 that take longer than 2 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is enabled
The expire_logs_days is not set.
The mysqld will retain the entire binary log until RESET MASTER or PURGE MASTER LOGS commands are run manually
Setting expire_log_days will allow you to remove old binary logs automatically
See http://dev.mysql.com/doc/refman/4.1/en/purge-master-logs.html

WORKER THREADS
Current thread_cache_size = 384
Current threads_cached = 15
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 150
Current threads_connected = 4
Historic max_used_connections = 18
The number of used connections is 12% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
Max Memory Ever Allocated : 1 G
Configured Max Per-thread Buffers : 5 G
Configured Max Global Buffers : 803 M
Configured Max Memory Limit : 6 G
Physical Memory : 1.99 G

Max memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 82 K
Current key_buffer_size = 5 M
Key cache miss rate is 1 : 1862
Key buffer fill ratio = 100.00 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is supported but not enabled
Perhaps you should set the query_cache_size

SORT OPERATIONS
Current sort_buffer_size = 16 M
Current read_rnd_buffer_size = 7 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 4.00 M
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly
join_buffer_size >= 4 M
This is not advised

OPEN FILES LIMIT
Current open_files_limit = 11095 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine

TABLE CACHE
Current table_cache value = 5467 tables
You have a total of 732 tables
You have 155 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 255 M
Current tmp_table_size = 256 M
Of 21109 temp tables, 35% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.

TABLE SCANS
Current read_buffer_size = 7 M
Current table scan ratio = 929 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 117
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
Server is mainly Innodb due to previous row-locking issues.

View 4 Replies View Related

Apache :: Capturing Internal Apache Errors Return Custom HTTP Status

Nov 15, 2013

Server Version: Apache/2.2.22 (Unix)

On our production service, we've been getting numerous malformed POST requests to some of our CGI scripts that are showing up as 500 errors in our logs. They are malformed in the sense that the actual content length doesn't match the Content-Length specified in the request.

Here's the most trivial example I can come up with that reproduces the problem for us:

POST /some_valid_alias HTTP/1.1
Host: example.org
User-Agent: Arbitrary/1.0
Content-Type: multipart/form-data; boundary=---------------------------41184676334
Content-Length: 769
-----------------------------41184676334

In addition to the 500 error in the access log, we see the corresponding error in the error log:

(70014)End of file found: Error reading request entity data

Based on the nature of the POST request and the error response, it does appear that Apache is doing the right thing here.

The POST never actually makes it as far as the script being targeted (/some_valid_alias in the above example); in other words, Apache returns 500 to the client, writes the error to the error log and never executes the script.

Is there a way to capture/avoid internal Apache errors like 70014, and return some other HTTP status besides 500 (like 403)? It's particularly annoying in our case, because our server sends us an email for all 500 errors.

So far, our best "defense" against these 500 errors is to disallow POST for these aliases, which normally just ignore the POST data anyway (when the request is not malformed):

RewriteCond %{REQUEST_METHOD} ^POST$
RewriteRule ^/(some_valid_alias)(.*)$ $1$2 [R]

But this won't work for all our scripts, because in some cases we do want to permit POST.

View 2 Replies View Related

Apache Procs Constantly Rise, Until Apache Is Restarted

Jul 23, 2007

I've had this problem a long time now with my hosting network and decided to ask here hoping I get some good solutions, or if someone is willing to looking at this (I'll pay if they want).

Here's what I mean:
[url]

Problem is as you can see apache processes constantly rise infinitely, at least until I restart apache (/etc/init.d/httpd restart). The point of restart is shown in red lines.

And after restart, it goes down again for X amount of hours then eventually rises again infinitely until it's restarted again.

But the fact that after restart it remains down, it means it had the potential to be down all along.

So my question is: what could be causing this and does anyone have solution to keep them low at all times (as per graphs)?

View 14 Replies View Related

Increasing The Apache ServerLimit In Apache 2.2.8 Version.

May 28, 2008

The Linux Server got down when the MaxClients 256 is reached.
Error Log:

"server reached MaxClients setting, consider raising the MaxClients setting"

So that I have tried to increased the MaxClients Value to 500, after changed the value in httpd.conf and restart I get following error message.

" [notice] SIGHUP received. Attempting to restart
WARNING: MaxClients of 500 exceeds ServerLimit value of 256 servers,
lowering MaxClients to 256. To increase, please see the ServerLimit
directive."

So that I tried changed the Server limit in /usr/local/apache/include/httpd.h header file. but it seems like there is no entry.

Apache Version : 2.2.8

So I have added the ServerLimit 500 entry in httpd.conf file and restart the httpd service. But still shows the same warning mesg. Please help me regarding this.

We have the Dedicated server for Flash Game Server with following configuration.

RHEL4 OS
2GB RAM
Intel(R) Xeon(R) X3210 @ 2.13GHz
Cpanel Installed.
Apache 2.2.8
PHP 5.2.4
MySQL 4.1.2 (MySQL Server is working in differend server)

View 7 Replies View Related

.htaccess Issue With Apache 1.3, But Works On Apache 2.2

Mar 22, 2008

I have the following Apache redirect code in .htaccess:

RewriteRule ^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$ /domain.com/app/modules/content/latestNews.php?id=$1 [L]

This redirect works fine on Apache 2.2.8, but doesn't work on Apache 1.3.41

The following is the entry from error_log:
RewriteRule: cannot compile regular expression '^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$'

A simple Rewrite is working fine in Apache 1.3, but the above regualar expression doesn't seem to be working on Apache 1.3. Does anyone know whether Apache 1.3 doesn't support it?

View 3 Replies View Related

Installed Apache And PHP Only Seeing Default Apache Page

Jun 1, 2007

I am having an issue where I have a server that Directadmin is installed on. I go to the a url that is on the server and all i see is the default page of apache saying congrats, it is installed. Although there is no file like that in the public_html any longer and I can see my files in the public_html folder of that specific site.

View 6 Replies View Related

Downgrade CentOS 5's Apache 2 To Apache 1.3

Jan 3, 2008

I've been searching around with google regarding how to downgrade the Apache 2.2 which comes with CentOS 5 to Apache 1.3.39.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved