Apache :: How To Remove Connection And Keep Alive From Response Headers
Aug 17, 2012
How can i remove "Connection and keep-alive" from response headers ? I am using Apache http server to load balance two tomcat nodes
Apache Server- Apache/2.4.2
mod_jk - 1.2.27
Apache tomcat - Apache Tomcat/7.0.23
JDK - 1.6
I have also enabled SSL in the apache http server using mod_ssl. The load balancing works fine, but in all the response headers these connection attributes are added "Connection: keep-alive keep-alive: timeout=5"
Is there a way to remove these headers? I do not want these headers to be added in the response. I have also tried mod_header to unset these headers, but no use. HTTP/1.1 protocol is being used, so eventhough the connection is not present in the header, the connection would should be considered as persistent. Why is apache sending these attributes explicitly in each response. I just want to get rid of these attribute...
View 7 Replies
ADVERTISEMENT
Aug 30, 2007
i have cpanel 11 with exim 4.6
i would like to be able to remove certain headers with the exim filter.
View 2 Replies
View Related
Apr 21, 2008
I have a VPS with 256MB of guaranteed memory, and no burst/swap. Having little memory like this is quite common for a VPS and I want to know how to make the most of it while running websites. By far the biggest culprit for taking my memory is Apache and I'm not convinced that the default setup makes sense on a VPS.
I know there are other daemons out there that use considerably less memory, such as lighttpd, but enough people (myself included) are going to use Apache regardless (they might require some of the advanced features after all) so it is worth knowing how to get the most out of it.
Apache 2 has various mpm options, most notably prefork and worker. As I understand it the prefork method forks processes to handle requests ahead of time, and can fork more on demand if required, each process handles one request at a time. Worker uses threads, again created ahead of time and on demand, each thread handles one request at a time.
With the default configuration and prefork Apache spawned 6 processes each taking about 5MB, so there goes 50MB in total. With workers it wanted to create 50 threads, each with a 10MB stack, this instantly went over the memory limit so wouldn't start at all. Thankfully the stack can be adjusted using the ThreadStackSize setting so it can be made to run, but even after this what do you really have for your memory?
One problem with having one request per process/thread is that, again by default, Apache has a keep alive setting of 15 seconds. This means that once a request has been processed, the process/thread is then kept around for up to 15 seconds in case the client wants to do anything else. With prefork that is 5MB of memory being used, and even with threads with a reasonable 1MB stack size there is still a huge amount of memory wastage on a connection that might not even do anything. Meanwhile other visitors might be getting out-of-memory problems as Apache tries to spawn more handlers to meet demand.
I think it should be fairly obvious that the worker mpm is the best option here, if everything works fine with a 1MB stack then the thread overhead is considerably lower than the process overhead.
The new events mpm should relieve this problem as it uses an event queue to keep an eye on keep alive connections rather than a whole thread. Unfortunately this mpm is not considered stable yet, so in the mean time I am wondering if VPS users should just disable keep alive, or at least adjust it to just a few seconds.
The benefit of keep alive is that it reduces network traffic and CPU load as there is a small amount of overhead in setting up a new TCP connection. When servers had 400MHz chips and massive 256MB of ram this was a good trade off. But now VPS often have access to much more powerful processors, and the same 256MB isn't considered massive any more so a lot of applications are less frugal and less adept at running in this environment.
In the unlikely even that Apache had 200MB to play with, using 1MB threads means that the system can handle 200 idle connections before running out of resources and failing to handle new connections. With a keep alive of 15 seconds you can support 200 connections per 15 seconds. In light of the fact that many newer browsers will open 4 simultaneous connections (up from the previous 2) that is only 3.34 users per second. Drop the keep alive to 1 second and you can handle 50 users per second. These numbers are unrealistic because they assume the request handling itself takes no time at all, but a lot of requests can be handled in split seconds so maybe these numbers aren't so far fetched. If the request handling takes 250ms and you turn keep alive off you could handle 200 users per second.
I am thinking that it would be great to have a reverse proxy sat in front of Apache, one that used an event queue and thus had little memory overhead for maintaining incoming connections, but closed down its connection to Apache after each request. Unfortunately I do not know of one.
View 3 Replies
View Related
Jul 16, 2008
I'm running 4 websites on a quad core xeon x3220, with 2gig of ram. It's 4 proxy sites, they are running fine and dandy, except for the fact that even when their is little traffic going to them ram is still just as high. I'm running debian 4.0, and heres a copy of my footer Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch11 mod_perl/2.0.2 Perl/v5.8.8. I'v modified nothing since I got the server, I installed apache2, and awstats, that's it. I'v read up about optimizing and it hasn't helped much, and I thought maybe their is proxy specific tweaks I could make to the conf.
View 6 Replies
View Related
May 12, 2014
It appears some elements of the ICPH webpage have keep-alive and some not.
I want to ask how to achieve all are loaded with keep-alive?
htaccess contains:
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
View 6 Replies
View Related
Jun 25, 2015
I get "502 Bad Gateway" errors in browser and found this in logs:
- upstream prematurely closed connection while reading response header from upstream
- failed (111: Connection refused) while connecting to upstream
restarting Apache solves the problem temporarily.I tried tweaking both nginx and php-fpm config files without success.
View 9 Replies
View Related
May 13, 2009
I bought a VPS to run a part of a application I have and it needs to connect to my database in cpanel. I have set everything up properly and allowed the remote server to connect to my server, I updated the DB connect file with the correct mysql server username and password. But when I try and run the script I get this error.
Quote:
Client does not support authentication protocol requested by server; consider upgrading MySQL client in
I'm not 100% sure what to do. I don't understand why it wouldn't work because it works perfectly on the main server with my scripts. But I get that error message on the remote server.
View 4 Replies
View Related
Jun 13, 2013
I get this error sometimes in the apache log for my site (and then my server gets slower and slower until it goes offline):
Code:
[Thu Jun 13 11:58:48.675867 2013] [core:error] [pid 1368:tid 2344] [client 111.222.333.444:38360] End of script output before headers: index.php
I am using a Windows Server 2012 64 bit server, but I had the error on a Windows Server 2008 64 bit server too.
The new server only has 1 site on it - and it is a Joomla 2.5 site. The server is dedicated and has 8 CPU cores and 24 GB ram and so on.
I have googled the error enough to understand that my Apache server (downloaded from this site) is misconfigured somewhere.
View 2 Replies
View Related
Jul 23, 2014
I want to pass the X-SENDFILE header to apache through nginx.
Is this possible or do i have to disable the reverse proxy?
View 1 Replies
View Related
Dec 18, 2014
I have compiled apache with below configuration
./configure --prefix=/app/apache2_4 --with-apr=/app/apache2_4/apr --with-apr-util=/app/apache2_4/apr-util --with-pcre=/app/apache2_4/pcre/ --enable-ssl --with-ssl=/usr/bin/openssl --enable-modules=all --enable-mods-shared=all --enable-proxy --enable-mime-magic --enable-rewrite --enable-speling--enable-mpms-shared
But after compilation I have added expiry,deflate headers but I am not able to see either ETAG and LAst-modified header...
View 1 Replies
View Related
Aug 28, 2014
I am trying to setup dynamic content configuration in apache 2.2 httpd conf. Here is the configuration and couple test cases:
CONF:
<FilesMatch ".(js|css|gif|jpg|jpeg|png)$">
Header set Cache-Control "no-cache, no-store, max-age=0, must-revalidate"
</FilesMatch>
TEST 1:
Without <FilesMatch> directive, the headers are set to all requested content as it should. This includes content served from apache server and content from a separate application server.
TEST 2:
If I use the above configuration example, I can see that static content comes with correct headers only
View 1 Replies
View Related
Jun 16, 2014
My development environment is:
OS: Windows 2003 SP2
Httpd: 2.4.9
JDK: 1.7.0_60
Tomcat: 7.0.45
mod_jk: 1.2.40
When I deploy my application into tomcat, and bind httpd with AJP, httpd do not response occasionally, it will halt 2-3 minutes. The quickly way is restart httpd
View 1 Replies
View Related
Oct 21, 2014
I have setup a reverse proxy that allows users to query an internal server. That internal server returns a JSON or XML response.
In that response some URLS need to be rewritten as they cannot be resolved externally. Is it possible to rewrite JSON/XML response bodies?
I experimented with "ProxyHTMLURLMap 1.1.1.1 2.2.2.2" but that did not work (seems to ignore the JSON response entirely)...
View 1 Replies
View Related
Oct 17, 2013
My site will wait for 30s almost everytime before loading any of the page itself.Specs of my install:
- DigitalOcean Droplet (VPS) with Ubuntu Server 12.10: 512 Ram and 20GB SSD (not even coming close to needing more RAM, still have 240MB free according to top)
- Wordpress 3.6.1
- 5 plugins: W3 Total Cache, Wordpress SEO by yoast, WP Better Security, WP Smush.it, and Redirection (problem occured before adding the last 2, I can't remember about the others)
- No traffic to speak of. I get maybe 10 uniques/day.
- Apache 2.2.22
- MySQL 5.5.32
I've optimized my site itself the best I can, minifying and combine js and css files, using the WP Smush. It plugin to compress images, serving jQuery from a CDN, but none of that worked the 30 second wait (though it did shave about 10 seconds off the load time after the wait for response).
I was using cloudflare and had to fiddle with the nameservers of my domain, but cloudflare didn't work at all and I switched the nameservers back to normal pointing DNS directly at my site to eliminate the obvious causes. I'm comfortable with Linux and the command line. This is the link to my site: [URL] ....
View 3 Replies
View Related
May 30, 2013
I am using the latest version of Apache on an Windows XP machine
When my web service is down for maintenance, since Apache is will still be up and running, I would like for Apache to serve an xml file as a response for the appropriate request. I have three operations available, makePayment, calculateFee, and voidPayment.
Is it possible to have Apache determine what type of request is made for example if I have an xml error page for each operation; how will Apache know which xml file to serve based on the operation request from the client
To make it more clear: What is the best practice for modifying apache to know what request is being made in order to serve the appropriate xml file?
View 1 Replies
View Related
Mar 4, 2014
We are trying to disable server info into response header.
Header unset Server
Header set Server "unknown"
It is not working.We have installed "Apache 2.4.6-x86 server" on Win 2008 R2 Standard server (64-Bit).
View 3 Replies
View Related
Jan 22, 2014
I have Configured Apache2.4.4 for forward Proxy and tested from my browser the response is very slow and even not coming complete Response for some requests.
I also Tested the same for Apache2.2 Forward Proxy it is very fast and good.
May I know what is the Problem in Apache 2.4
Is there any Issues in proxy modules (mod_proxy,mod_proxy_connect.so,mod_proxy_http.so) in Apache2.4
This is the same configuration i used for Apache2.2 and Apache2.4
##########################################################################
## Apache Forward proxy
##########################################################################
<IfModule !proxy_module>
LoadModule proxy_module modules/mod_proxy.so
</IfModule>
<IfModule !proxy_connect_module>
LoadModule proxy_connect_module modules/mod_proxy_connect.so
[Code] ....
View 1 Replies
View Related
Jun 8, 2009
is it possible to remove or reset Apache Usage Log in DirectAdmin?
because it takes large space on my server and it increase heavily everyday
any idea , I can't find anything on DA forums!
View 10 Replies
View Related
May 20, 2015
I use url http://myurl:8020/ERC to access application and I am able to. But I dont want to use port number in the URL.Would like to access application using http://myurl/ERC . I referred to one of the post and added below entries to httpd.conf file.
ProxyRequests Off
ProxyPass /ERC http://myurl:8020/ERC
ProxyPassReverse /ERC http://myurl:8020/ERC
But I am still not able to access http://myurl/ERC.LoadModule entries are enabled and I have restarted apache.
View 3 Replies
View Related
Mar 18, 2013
I've modified my old website, and now need to remove the phrase "cheap-products"
Some example url's
randomdomain.com/product-1000-cheap-products/
randomdomain.com/product-1001-cheap-products/
randomdomain.com/product-1002-cheap-products/
How do I make it so it will forward (seo wise) to the following
randomdomain.com/product-1000/
randomdomain.com/product-1001/
randomdomain.com/product-1002/
View 4 Replies
View Related
Oct 31, 2009
How to Remove Apache File Not Exist Errors
Here is the Reply of the Sys Admin
Dear Customer,
I am sorry. We are not able to resolve the File Does Not Exist errors for you. You have to do it own.
The unique errors that you have today for Apache are as follows:
client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind
File does not exist: /usr/local/apache/htdocs
File does not exist: /usr/local/apache/htdocs/501.shtml
File does not exist: /usr/local/apache/htdocs/images, referer:
[url]
File does not exist: /usr/local/apache/htdocs/jailbreak-iphone-3-0-1-with-redsn0w
File does not exist: /usr/local/apache/htdocs/robots.txt
Invalid method in request x16x03x01
Invalid method in request x80bx01x03x01
# Invalid URI in request alt="Follow%20via%20FreiendFFeed"%20title="Follow%20via%20FriendFeed"%20border="0"%20height="16"%20width="16"%20/>Home
Top%20StuffiPhoneWindows%207FirefoxVistaTipsWordpressSubscribeSitemapAdvertise xc2xa0xc2xa0xc2xa0Vertical1240899%20=%20false;ShowAdHereBanner1240899%20=%20true;RepeatAll1240899%20=%20false;NoFollowAll1240899%20=%20false;Ban nerStyles1240899%20=%20new%20Array(%20%20%20%20"a{display:block;font-size:11px;color: HTTP/1.1
PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93
PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93, referer:
[url]
PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93, referer:
[url]
PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93, referer:
[url]
PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93, referer:
[url]
request failed: error reading the headers
I would advise that you resolve as many of these errors as you are able.
As to what caused the load on your server, I can't say. There is nothing in your logs to indicate the source of the problem. During the 1PM period when your server overloaded last there were only 29 errors in Apache. The errors that occurred during this time would not cause excessive load.
I have installed a script to monitor your server. If this load issue occurs again within one week or before your next reboot, whichever comes first, we should be able to determine the source from the script's logs in /var/log/sys-snap.sh.
View 14 Replies
View Related
Sep 1, 2007
How would I Remove/Modify the Apache version from Domaintools?
Heres what I mean:
[url]
View 8 Replies
View Related
Dec 11, 2014
I am using 2.2.29 in Windows.Trying to remove one cookie in a request header before passing the request to the application, but having trouble. The cookie is in the middle of the request header.
View 1 Replies
View Related
May 14, 2009
As i seem unable to get a decent reply to my ticket which is currently open with you (#210268) through your ticketing system. I am afraid i need to resort to posting here.
As i have asked in the ticket numerous times, can you please provide a reason as to why our server was offline? This ticket has been open since 29th April and so far we have only been told that you had "a couple of issues with you system".
View 14 Replies
View Related
Mar 20, 2008
I can't not change Keep Alive: on to off
My httpd.conf
User apache
Group apache
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 3
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxRequestsPerChild 0
ServerLimit 1024
MaxClients 250
ExtendedStatus On
ServerSignature Off
My php.php info:
Apache Version Apache
Apache API Version 20051115
Server Administrator webmaste@MYDOMAIN.com
Hostname:Port www.MYDOMAIN.com:0
User/Group apache(48)/48
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 60 - Keep-Alive: 1
Virtual Server Yes
Server Root /etc/httpd
Keep Alive still ON in my php page report.
View 2 Replies
View Related
Jun 27, 2007
Are there any clients of ifasthosting?
I have a vPS and couldnt connect my SSH or reset my server about 72 hours and they didnt reply my ticket about 24 hours. also server's panels are down so i couldnt get backup.
Are there any person like me? My VPS has problems after they migrate thier node from Softlayer . I want to get my backup folder now but they arent replying me.
View 14 Replies
View Related
Oct 23, 2007
I remember when digits.com was a big deal to me when I first got into web design in the 90's.
Anyways, [url] Do you think they are serious with that deal?
Do you think people still use it? The main site is PR8 but thats possibly due to the free counter-link backs and simplicity of the domain.
View 9 Replies
View Related
Nov 8, 2007
if anyone knows the status on vps4less.de? I have a VPS with them that was set to renew on 10/29, but I canceled way before then, or at least I thought it should have. I noticed a couple days after the renew date that it was still online so I sent another one, this time via WHMCS and request account cancellation link. So far, it's been 10 days (now 11/8) and I haven't heard from them, and my VPS is still online. I received an automated invoice overdue notice today, but I know that's just because they haven't closed my account yet.
View 1 Replies
View Related
Jul 29, 2009
I am checking WHM apache status and I am seeing roughly 72+ connection from 127.0.0.1 (server), why? What could be the problem? Is the server hanging up or is this an indication that something is broken in the server?
View 2 Replies
View Related