From 385c762ddd4d585ccd471768718cf14230353cbd Mon Sep 17 00:00:00 2001 From: alessio Date: Tue, 23 Aug 2016 10:45:48 +0200 Subject: [PATCH] fixed #5 --- realize/app.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/realize/app.go b/realize/app.go index a8bf76d..142c936 100644 --- a/realize/app.go +++ b/realize/app.go @@ -5,6 +5,7 @@ import ( "github.com/fatih/color" "log" "sync" + "syscall" "time" ) @@ -62,6 +63,15 @@ type App struct { func init() { log.SetFlags(0) log.SetOutput(new(logWriter)) + + // increases the files limit + var rLimit syscall.Rlimit + rLimit.Max = 10000 + rLimit.Cur = 10000 + err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit) + if err != nil { + fmt.Println(Red("Error Setting Rlimit "), err) + } } // Init is an instance of app with default values