diff --git a/cmd/realy/main.go b/cmd/realy/main.go index 69ff5d5..f886691 100644 --- a/cmd/realy/main.go +++ b/cmd/realy/main.go @@ -40,9 +40,9 @@ func main() { log.F.F("SUPERUSER is not set") os.Exit(1) } - runtime.GOMAXPROCS(1) + runtime.GOMAXPROCS(4) debug.SetGCPercent(10) - debug.SetMemoryLimit(250000) + debug.SetMemoryLimit(2500000) var err error a := cfg.Superuser var dst []byte diff --git a/socketapi/handleAuth.go b/socketapi/handleAuth.go index fd10287..7ea51cd 100644 --- a/socketapi/handleAuth.go +++ b/socketapi/handleAuth.go @@ -51,7 +51,7 @@ func (a *A) HandleAuth(b []byte, srv interfaces.Server) (msg []byte) { var accepted bool if accepted, msg = a.Server.AddEvent(context.Bg(), ev, a.Listener.Request, a.Listener.AuthedBytes(), a.Listener.RealRemote()); accepted { - log.I.F("saved event %0x", ev.Id) + log.W.F("saved event %0x", ev.Id) } } } diff --git a/socketapi/handleMessage.go b/socketapi/handleMessage.go index 8a0a474..5bfed15 100644 --- a/socketapi/handleMessage.go +++ b/socketapi/handleMessage.go @@ -2,6 +2,7 @@ package socketapi import ( "fmt" + "runtime/debug" "realy.lol/chk" "realy.lol/envelopes" @@ -40,5 +41,5 @@ func (a *A) HandleMessage(msg []byte, remote string) { return } } - + debug.FreeOSMemory() }