Limit Apache (thread) Connections Per Request
Jan 9, 2007
I've been having trouble the past few days with someone who's been "attacking" my site so to speak by continuously downloading very large files with as many connections as (he) can open. I operate a large downloads site for computer games, this person has selected the largest files (like 400-500MB). Not sure of the real intent other than to clog up my bandwidth capacity. Also he appears to be using proxies since as soon as I ban one, another shows up seeminly from China.
Anyway, I have mod_bw and I've limited the number of connections in the downloads area to 2. While that works ok, his tool uses threads like a download manager would and he's using up 30-40 child threads for his 2 file downloads.
So 2 questions,
Is there anyway to not only limit file downloads to 2, but limit the number of connections per request? Many of my visitors do use download managers and I'd like for them to continue using them but use a reasonable number of threads like 6 or 8, but not 30.
Also, is there a way to restrict access to someone using a proxy?
View 2 Replies
ADVERTISEMENT
Apr 12, 2007
any good rule to limit Apache (port 80) connections from 1 IP to 15 with iptables/csf?
And total connections to the box to 100?
View 6 Replies
View Related
Apr 21, 2008
My server was unstable at this month sometimes fork 700 process and apache 80 access per second and that's made server very slow . very bad browsing
when i checked log files /var/log/messages found that errors
Apr 20 04:06:28 suhosin[798]: ALERT - configured request variable value length limit exceeded - dropped variable 'message' (attacker '212.107.116.238', file '/usr/local/cpanel/cgi-sys/php4')
Apr 22 00:27:05 suhosin[15442]: ALERT - configured request variable name length limit exceeded - dropped ....
View 6 Replies
View Related
May 15, 2008
How can I Limit connections per IP in IIS6?
For example 10 connection per IP is allowed in a minute.
View 0 Replies
View Related
May 31, 2008
on setting up some sort of firewall who only allows 10 connections from the same ip to avoid spamming, abuse on the server.
How should i do this?
View 3 Replies
View Related
Aug 14, 2008
Does anyone know a script or something I can edit to fix this commonly seen error in the apache error_log:
[Wed Aug 13 22:09:25 2008] [error] [client IP] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: [url]
I don't want to increase anything as I read from different places that , that's not good to do. Most say there is a rule written wrong somewhere or something, or a loop of some kind, but I'm not sure how or where to fix it.
View 1 Replies
View Related
Dec 14, 2008
one of my friend say that if i install an apache module which one limit the users conection can help me to protect from ddos.
becaus one of my users domain is under ddos and i think that if i limit his conection, if sombody wants to do ddos and open conection foraxample up 30 he is attacker and ban.
is it right and how i can do it and limit a one user?
View 6 Replies
View Related
Aug 25, 2007
How is this done? from what I gether, there's nothing built into apache which can do this which I personally think is a bit silly as it seems like a common thing. Can anyone offer any help (for apache 2).
View 5 Replies
View Related
Jun 11, 2009
I have a powerful 8 core 8gb ram web server with scsi raid drives running RedHat EL 4. This server handles 2,000 - 3,000 HTTP requests per second via Litespeed httpd without strain (over 60%+ CPU idle time during peak load, under 1% IO wait). As the traffic volume continues to increase I've encountered a strange problem, the symptoms of which are as follows:
- About 1/4 or 1/3 of new connections are not answered by the server - they time out.
- All connections that are answered have exactly 3 seconds added to the time it takes to establish connection with the server (can be seen as "Connecting to ..." phase in FireFox). HTTP response times were tested by Pingdom from multiple locations all over the world.
- The problem is either "on" or "off", it is not gradual.
- Server ping is unaffected during the problem - no delay and no packet drops.
- The problem does not happen during off-peak hours of the day.
If litespeed httpd settings are tweaked to keep as many connections as possible in keepalive state for as long as possible, the problem is avoided, while tens of thousands of connections are kept in keepalive state.
Possible causes that were tested and eliminated: PHP/MySQL load (problem applies to static files exactly the same), CPU / IO / RAM, network uplink, hardware firewall, DNS.
This makes me think that there is some kind of bottleneck of how many NEW connections per second the server can accept. By maxing out keepalive quantity and duration I'm reducing the number of new connections per second. This is a temporary fix that will only work up to a certain point.
After investigation, litespeed staff verified that my litespeed configuration was correct and after some testing said that nothing in litespeed was responsible for this limiting factor. Litespeed process uses relatively little CPU and can definitely handle more volume.
Following sysctl.conf values were increased substantially to see if that will make a difference: tcp_max_syn_backlog, tcp_max_tw_buckets, tcp_max_orphans, netdev_max_backlog, somaxconn, file-max. This didn't produce any results. Disabling syncookies didn't help either. dmesg doesn't have any notices of limits being hit or throttles being applied.
Litespeed staff suggests that likely some limit in linux kernel is being reached. The strange 3 second delay does seem like an "intelligent" DDOS protection strategy of some sort. Perhaps this is some kind of kernel level DDOS protection?
View 9 Replies
View Related
Jan 27, 2008
Some limit connection mods can limit max connections per vhost, any mod can limit connections to apache server per IP?
View 3 Replies
View Related
Apr 26, 2008
windows 2003
limit connections per ip to a port
im currently using routix netcom
it can limit the connections( NOT bandwidth) only but not per ip
another firewall which limit connections per ip
View 14 Replies
View Related
Apr 13, 2007
When I SSH'd into my box, I received this message:
example.pl is on this server. HTTPD connections have been limited to restrict this script from overloading server. All servers that have hosted this file need to have extremely limited http connections or have this file removed. It is poorly written and intense on CPU/memory.
How do I go and allow example.pl to be run on my server again? I use it solely for personal sites, so I wish to not have this file blocked and be allowed to run. I've searched for almost an hour now so I figured I would go ahead and post to see if any more experienced members could assist.
View 3 Replies
View Related
Jan 24, 2007
OS: Linux, on Apache 2.0
=======
Would you know and kindly tell me if there's a way to limit X number of connections per hosted site?
Because I don't want someone with high traffic forum unfairly stealing most connections for himself, which makes other sites suffer in performance.
View 1 Replies
View Related
Jun 22, 2007
how i can limit http and mysql connection limit on per domain basis.
View 2 Replies
View Related
Oct 25, 2009
I need to do this:
(1) domain1.com limit to 10 connections per IP per 30 seconds but allow if accessing file beginning with x.php such as x.php?981 x.php?o19
(2) domain2.com limit to 10 connections per IP per 30 seconds only if accessing file beginning with x.php but allow if accessing file beginning with y.php y.php?981 y.php?o19 .....
View 8 Replies
View Related
Dec 6, 2008
when i check apache status, i see one domain send many request to server, for example:
domain.com 10.20.30.40
domain.com 10.20.30.40
domain.com 10.20.30.40
domain.com 10.20.30.40
domain.com 10.20.30.40
-
-
-
how can i prevent this problem?
this problem tease me and my server, because induce apache to work unremitting.
Ram Usage is: 65%!
View 5 Replies
View Related
May 12, 2015
I am working with XAMPP 5.6.8 (Apache 2.4.4, MySQL 5.5.32 and PHP 5.6.8 ) on a 64 bits Windows 7 Ultimate (Service Pack 1) Operating System.
I am working with an Arduino UNO and a WIFI Shield connected to the Apache server.
I am sure Arduino is connected to the WiFi network and to the server, and it also sends the GET request to the server.
Apparently, everything is OK because I can see the 200 OK message from the server in the Arduino serial monitor, but I find no trace of that request in the server log although all the requests made from the browser (by typewriting the server address in the browser address bar and pressing enter) appear in the server log.
View 6 Replies
View Related
Oct 21, 2007
New VPS, CentOS 4.5, Apache 2.0.52, Plesk 8.2.
Every request is getting processed 3 times. In other words, if I point my browser to the URL of an image hosted on this server, it generates 3 lines in the access log each time I refresh the page.
If I point it to a script which logs something to a file, it logs it 3 times, showing it's run all 3 times.
I haven't touched the httpd.conf or any other configuration. Any idea what could cause this?
View 4 Replies
View Related
Jan 17, 2007
Is there any tool out there (I prefer command line) that is especially for analysis of apache error log files ? I need something that can summarize information from log and give them back to me.
View 0 Replies
View Related
May 22, 2015
My site is hosted in shared hosting.
Whenever I try to upload text using form It is showing me '413 - request entity too large'
I have uploaded the screenshot of the problem so that you can view the problem i details.
View 1 Replies
View Related
Nov 13, 2013
In my web site I have several index pages in different languages in the following format
[URL] ....
Two days ago I noticed increased, many times. Google bot activity on my site and when I checked my log file I found that all pages crawled were wrong web addresses: to the above index were added existing files from my site like
/folder1/folder2/file.html
So, the strings looked like
[URL] ....
And surprisingly all they returned code "200".
My question is: is there any way to rewrite such requests to the first ".html" found in the string.
View 2 Replies
View Related
Feb 3, 2014
I have question for apache in centos. I loaded the apache and I want to know that which MPM used by default two MPM defined in apache but which MPM apache actually used for request server.
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
[Code] ....
View 6 Replies
View Related
May 31, 2015
I have following components configured.
LoadBalancer, Apache and SSL enabled JBoss.
Lodbalancer URL ....
Apache URL ...
Jboss URL (SSL) ...
When the request comes to Loadbalancer, it is forwarding the request fine to apache.
But from apache I am not able to forward the request to Jboss(SSL)
I am using below settings on httpd.conf file of apache but url is getting changed to [URL] .... from [URL] ...
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://servername:8443/EPC [R,L]
I still want the generic name (emsprod.com) to be displayed on url instead of server name.
How I can successfully forward the request to Jboss when I access LB url.
View 3 Replies
View Related
Nov 18, 2014
I would like to rewrite mysite.com to www.mysite.com.
However, if the request is a subdomain (i.e. blabla.mysite.com), then it should not rewrite.
I believe this gets me close, but it will not differentiate the subdomains (i.e., blabla.mysite.com).
View 5 Replies
View Related
Nov 1, 2014
I've just joined the group and new to Apache/php. I have just assembled a website in Joomla/vertumart and called petslovezone.com.au. I want to redirect all the request such as
1. http://xyz.com to https://xyz.com
2. http://www.xyz.com to https://xyz.com
3. xyz.com. to https://xyz.com
4. www.xyz.com to https://xyz.com
now know I have to change .htaccess "RewriteEngine On" section. What would be the best code to do all the above.
Apache Version2.4.10
PHP Version5.4.32
View 2 Replies
View Related
Jul 4, 2014
As we are planning to implement Mobile for our platform, we want to distinguish between request coming from Mobile and Web in Apache. We will be using Apache for Reverse Proxy and we want it to differentiate the request source and forward it to required destination.Is this possible ?
View 1 Replies
View Related
Sep 15, 2008
Just logged in my cPanel, and Apache Server Status shows
Parent Server Generation: 7
Server uptime: 2 hours 52 minutes 5 seconds
Total accesses: 701666 - Total Traffic: 63.7 GB
CPU Usage: u1610.22 s255.4 cu0 cs0 - 18.1% CPU load
68 requests/sec - 6.3 MB/second - 95.2 kB/request
400 requests currently being processed, 0 idle workers
I told customer service and said my website (a big forum) have 4000 people now, I felt very slow, could the slowness caused by this max apache connection setting?
I got reply: "400 seems to be as high as Apache can go. Your httpd.conf settings currently show 500 max connections enabled. If Apache is stopping at 400 then this is it's hard limit for maximum connections. Also If it was able to go even higher you would eventually run into memory issues on the server that would cause the server to crash."
Can anyone tells me if "400 requests currently being processed, 0 idle workers " is a problem or could it be the cause of the slowness. I imagin if more people request connection, and apache can't deal with that much, it has to let those request wait in the queue, therefore caused slowness or time-out.
The seem server could deal with 8000 people online before, no any problem at all and speed was quite fast. I don't know what i should do now.
View 14 Replies
View Related
Jan 19, 2007
is a way to understand whats the bext max apache settings for me?
Maybe to look over httpd-status requests currently being processed and the number of idle servers or the number of strokes?
Or probably the best way is to use some benchmark application but then i am not sure how to test my config?
View 4 Replies
View Related
Sep 24, 2007
I currently have a dedicated server with the following specs:
Celeron 2.6ghz
2gb ram
100mbit connection
the cpu load is always under 0.7, and I always have at least 400mb of free ram.
The site takes about 5-10 seconds to load a test page with just a single word on it. When I type netstat -n | grep :80 | wc -l
I get around 1100-1200 connections. I get about 130k page views per day.
My site is about 95% static html, it has about 150 images per page. How can I speed up my site?
Here are my apache httpd.conf settings:
Timeout - 100
KeepAlive - on
KeepAliveTimeout - 12
StartServers - 48
MinSpareServers - 32
MaxSpareServers - 64
MaxClients - 1500
MaxRequestsPerChild - 1000000
View 6 Replies
View Related