set rlimit in backend
This commit is contained in:
parent
bd39a9c2bc
commit
0e4aa4db19
|
@ -94,6 +94,10 @@ func backendServer() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panicf("unable to register shrinker: %s", err)
|
log.Panicf("unable to register shrinker: %s", err)
|
||||||
}
|
}
|
||||||
|
err = setLimits()
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("error setting backend limits: %s", err)
|
||||||
|
}
|
||||||
for _, h := range backendhooks {
|
for _, h := range backendhooks {
|
||||||
h()
|
h()
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,3 +41,10 @@ func getSensors() Sensors {
|
||||||
|
|
||||||
return sensors
|
return sensors
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func setLimits() error {
|
||||||
|
var limit syscall.Rlimit
|
||||||
|
limit.Cur = 2 * 1024 * 1024 * 1024
|
||||||
|
limit.Max = 2 * 1024 * 1024 * 1024
|
||||||
|
return syscall.Setrlimit(syscall.RLIMIT_DATA, &limit)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue