Chinaunix首页 | 论坛 | 博客
  • 博客访问: 84358
  • 博文数量: 18
  • 博客积分: 1521
  • 博客等级: 上尉
  • 技术积分: 150
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-22 18:07
文章分类

全部博文(18)

文章存档

2014年(4)

2011年(1)

2010年(4)

2008年(9)

我的朋友

分类: LINUX

2014-04-02 10:28:42

同事说 分发更新代码的时候 个别没有同步
查了一下日志发现如下错误
Deactivating service rsync due to excessive incoming connections.  Restarting in 10 seconds.
EXIT: rsync status=0 pid=15023 duration=2(sec)
Activating service rsync

网上查了一下,per_source_limit from=是xinetd的一个机制:

per_source

Takes an integer or “UNLIMITED” as an argument. This specifies the maximum instances of this service per source IP address. This can also be specified in the defaults section.

instances

determines the number of servers that can be simultaneously active for a service (the default is no limit). The value of this attribute can be either a number or UNLIMITED which means that there is no limit.

改成下面这样就好了,增加instances及instances:

cps  xxxx yyy
cps:表示当同一秒,最大的连接数达到XXXX的情况下,这个xinetd.下的服务就会停止yyy秒,这要就有效的防止来DDOS攻击


instances:表示同一个服务,同时连接的最大数量。 
per_source:指定来自某个IP服务的最大实例数 




service svn
{
        disable = no
        per_source              = UNLIMITED
        instances               = UNLIMITED
        port                    = 3690
        socket_type             = stream
        protocol                = tcp
        wait                    = no
        user                    = root
        server                  = /usr/bin/svnserve
#        server_args             = -i -r /var/svn-repos
        server_args             = --log-file /var/log/svn.log -i -r /var/svn-repos
}



阅读(2971) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~