How To Limit Http/mysql Connections Per Domain

Jun 22, 2007

how i can limit http and mysql connection limit on per domain basis.

View 2 Replies


ADVERTISEMENT

How To Limit Connections Per IP Address Based On Domain + String

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

Current Connections For HTTP

May 12, 2009

I want to know the right command by which one can see current connection to the HTTP server.

I searched a while and got 2 different answers, wanted to know which is more accurate as there is lot of difference in results

Code:
-bash-3.2# ps aux|grep -i HTTP|wc -l
19
-bash-3.2# netstat -an|grep :80|wc -l
228

View 7 Replies View Related

Limit Connections Per IP

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

Limit # Ip Connections

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

Limit Connections - DDOS

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

Limit Connections Per IP/Hostname

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

Hitting Connections Per Second Limit Of RedHat EL

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

How To Limit Apache2 Global Per IP Connections

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

Any Firewall For Windows To Limit Connections Per Ip

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

Limited HTTPD Connections. How To Not Limit Them

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

Http+limit User

May 15, 2008

How can i set user limit to access web site ,

Ex:- if my site access 10000 users at a time and then if any more user access that site it will receive error or custom error page.

and how to and where i can set this values...........

View 1 Replies View Related

Rule To Limit Apache (port 80) Connections From 1 IP To 15

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

How To Limit Num Of Connections Per Hosted Site On Ded. Server

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

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 View Related

MySQL Max Connections

Jan 16, 2008

My PHP application is starting to reach max mysql server user connections limit (currently set to 60). I listed mysql process list in phpmyadmin and found there lot of queries with status "LOCKED" these hang there for a long time(not always just sometimes - twice a day) and then connection limit is reached. It causes load average about 40 for as long as 10 - 20 minutes

I think it may be bacause of query structure. There are some queries with many inner joins...

Here is typical situation from phpmyadmin's process list:

1. select ... from table_1
inner join table_2
inner join table_3
inner join table_4
inner join table_5
This show status : "Copying to tmp table" in phpmyadmin

2. update table_2 set ....

This shows status: Locked

3. select ... from table_2

This shows status: Locked

Seems then when temp table is being created the table_2 is locked and it cannot make update to table_2. or maybe it's locked because of just that update on table_2.

I want to avoid of creating temp tables... Can it help if I'll make separate selects without large table joins ?

View 3 Replies View Related

MySQL Max- Connections

Jan 7, 2007

I'm currently using MySQL 4.1.12 for Windows 2003, and I need to know how much possible connections can MySQL achieve? I'm currently around 650. I'm having 4 new servers online, and that will bring my total concurrent connections to 1000+.

how high it can go?

View 3 Replies View Related

MySQL Connections

May 24, 2007

I notice that most hosting have limit of mySQL connections.

If the max mySQL connections is 50 and I run a forum on this hosting,about how many people can visit my website at one time?

View 3 Replies View Related

Closing Mysql Connections

Feb 18, 2007

from what I view, wait_timeout is used for disconnecting connections. However, it applies to tcp/ip connection only. So, in my database connection, if I am using mysql server as localhost, that variable is not applied? In that case, how can I close connections automatically after xxx seconds?

View 8 Replies View Related

Mysql Connections Topping Out Within Seconds

May 13, 2009

i have a small cluster (one web and one db) setup and i host a rather popular group of 4-5 sites that allow users to dynamicly create their own mobile chat communitys automaticly. each site gets its own mysql db created and populated automaticly.

this is all fine,

but in the last 24hours weird things have begun happening, previously i had the sql max_connections set to 500 and this was perfectly adquate for the demand but now even when i set the connection to 4000+ they are all maxxed out within 5-10 minutes, and mysql processlist shows thousands of unauthenticated user connections sitting at login status,

i have gone through the sites and all their mysql configs are fine so i cant see what the issue is.

server specs below

db server:
dual amd opteron 246
8GB ram
120gb hd(64gb free)
33gb swap (rarly used but their for emergencys)
centos 5 64bit.
direct 100mbit lan to web serv
only mysql,ssh and webmin running, no other apps installed

web server:
amd athlon 64 3800+
plesk 9.2.1
4gb ram
2x120gb hds

apache status onthe web server only shows 120ish http connections but the sql keeps climbing

View 8 Replies View Related

MySQL Timeout On Active Connections

Oct 21, 2009

unfortunately my server crashes a lot recently. What happens is that some application creates a MySQL connection which hangs and then MySQL gets overloaded and takes the whole server down.

My question:

1. How do I configure MySQL to time out even on active connections ? I.e. after 30 seconds kill the process no matter if it is still active or not. Is that possible ?

2. How do I exclude the root user from that?

View 1 Replies View Related

[MySQL] Too Many Connections: Locked Queries

Dec 17, 2008

This has happened twice now. I have my wait_timeout variable set to 60 seconds, but occasionally my database gets overloaded with "locked" queries. Here's an example of my processlist:

Code:
| 14773848 | db_name | localhost | db_name | Query | 35483 | statistics | SELECT COUNT... |
| 14776290 | db_name | localhost | db_name | Query | 35144 | statistics | SELECT COUNT... |
| 14778877 | db_name | localhost | db_name | Query | 34841 | statistics | SELECT COUNT... |
| 14790744 | db_name | localhost | db_name | Query | 33056 | Locked | UPDATE... |
| 14791275 | db_name | localhost | db_name | Query | 32977 | Locked | SELECT... |
| 14791395 | db_name | localhost | db_name | Query | 32960 | Locked | SELECT... |
| 14791556 | db_name | localhost | db_name | Query | 32929 | Locked | SELECT... |
| 14791603 | db_name | localhost | db_name | Query | 32924 | Locked | SELECT... |
| 14791757 | db_name | localhost | db_name | Query | 32900 | Locked | SELECT... |
| 14792209 | db_name | localhost | db_name | Query | 32815 | Locked | SELECT... |
| 14792355 | db_name | localhost | db_name | Query | 32786 | Locked | SELECT... |

This continues on with locked queries all the way up to my limit of 450 connections, then the whole server goes down. Note the time spent processing these queries, 35483 seconds and counting! Surely the wait_timeout is supposed to prevent this from happening?!

Also, this appears to start with queries in the State "statistics". Then the State for the following queries becomes "locked". Does anyone know what these mean? Can I get them to timeout normally? Queries which never timeout are guaranteed to bring your server down eventually, surely this is not the desired behaviour.

View 4 Replies View Related

Best Host For Fast MySQL Connections

Aug 12, 2008

for a linux web host that has extremely fast mysql connections, 100GB of bandwidth, and the amount of space has to be at least 1GB. Price doesn't really matter.

View 8 Replies View Related

MySQL Stops Allowing External Connections

Apr 3, 2008

Recently I've upgraded my MySQL server. I connect to it via a conection from NIC to NIC (Internal IP addresses). Since the upgrade/format, I've managed to get everything back to the way it was. Everything works fine for 15-20 minutes. Then the PHP server can no longer access the MySQL server.

I tried logging in from the PHP server, I get access denied. I then tried logging in locally, on the MySQL server and I get in fine...

It's not like it's a firewall issue though, it's strange...

I tried updating PHP/MySQL to a few releases, even the RC's to no avail...

Something to note is that when I try restarting MySQL it can take 4-5 minutes, sometimes not even complete.

View 2 Replies View Related

Http, Named, Mysql Services Are Always Going Down

Jul 26, 2009

Just recently we've been noticing our services repeatedly going down.

Ie. http, named, mysql

View 14 Replies View Related

Limit Mysql

May 15, 2009

i dont want clients taking the servers I/O and server load over 4.00 when they do major update ect... querys on sql. is there a way to limit the ammount they can do?

View 4 Replies View Related

How To Detect Is It Domain Name Server (DNS) Or Http Down?

Aug 1, 2009

If i put domain.com on uptime checker,and downtime is detected,downtime will be reported if dns is down or if http server is down.So question is what i need to do to see what exactly went down?For network uptime i can ping ip adress,but for these two i really don't know.

View 3 Replies View Related

How Can I Http Access A Server Without A Domain

Mar 10, 2008

I've setup a dedicated server that is currently running with a domain bound to it. However this time I want to setup a centos 5.1 + latest apache 2 + bind 9 server that can only be connected to by IP address and doesn't have a domain name. So what do I need to modify in the below files to do so:

First of all will I even need bind at all? I already have it setup and (mis-)configured but I guess if I don't need it I can just take if off of autostart and stop the process "named".

Named.conf

options {
pid-file "/var/named/chroot/var/run/named/named.pid";
directory "/var/named/chroot/var/named";
query-source address * port 53;
allow-query { any; };
allow-transfer { };
recursion no;
notify no;
version "unknown";
};

logging {
category default { null; };
};

zone "server.domain.com" { type master; file "server.domain.com.db"; };
I don't even want the zone have domain.com in its name but that's just there so I could show you how I'd include server.domain.com.db.

server.domain.com.db

$TTL 14400
@ IN SOA ns1.domain.com. root.server.domain.com. (
2007052503
14400
3600
1209600
86400 )

server.domain.com. 14400 IN NS ns1.domain.com.
server.domain.com. 14400 IN NS ns2.domain.com.

localhost 14400 IN A 127.0.0.1
www 14400 IN A 78.129.174.164
I'm not sure what to do about those references to domain.com here, they shouldn't be needed but without them I don't know what to put here. ^^
Obviously I can't use those nameservers...

resolv.conf

nameserver 127.0.0.1
nameserver 78.129.143.155
nameserver 87.117.198.200
nameserver 87.117.196.200
The only thing missing from this file is "search domain.com" at the top, is that needed even though I won't really have any domains used by this server?

/etc/hosts:

# Do not remove the following line, or various programs
# that require network functionality will fail ....

View 7 Replies View Related







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