[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Post-commit hook failure.



-=| Martín Ferrari, Sun, Feb 08, 2009 at 02:10:29AM -0200 |=-
> Sorry for the late answer, I'm processing list backlog...
> 
> On Sat, Jan 10, 2009 at 08:04, Damyan Ivanov <dmn@debian.org> wrote:
> 
> > Tincho, do you happen to know a way to ratelimit incoming requests to
> > KGB?
> 
> I'm not sure what you mean. You want to ignore incoming floods at the
> soap level or just delay the IRC notifications to avoid flooding?

Both. Avoiding IRC flood (per IRC network) will help avoid banning KGB 
from the network. Ignoring input at the SOAP level (per project) would 
avoid growing too big of a queue.

Say commits come two per second and the maximum rate of IRC messages 
is 1 per second. If too many commits come, memory would exhaust, so 
there must be some limit.

Schedule::RateLimiter[1] could be used for input limitting (in 
non-blocking mode). That page also says that POE has a more 
heavy-weight solution to the problem, which may be more appropriate, 
since we are in POE land anyways.

    [1] http://search.cpan.org/~dwright/Schedule-RateLimiter-0.01/RateLimiter.pm

I am also not sure what is a suitable rate. Something like one commit 
every two seconds, with a burst of 30 commits? In RateLimiter terms 
that would be iterations=>30, seconds=>60.

The particular problem to solve is sending a series of commits when 
using git-svn. Git-svn allows you to develop some commits locally and 
the send them in a batch to the SVN. The rate limit should be such 
that "typical" commit series can go in and everything above that don't 
fill KGB server's memory due to IRC rate limitting.

-- 
dam            JabberID: dam@jabber.minus273.org

Attachment: signature.asc
Description: Digital signature


Reply to: