[精讚] [會員登入]
275

how to modify a service's ulimits on host OS

modify ulimits

分享此文連結 //n.sfs.tw/14575

分享連結 how to modify a service's ulimits on host OS@der amateur
(文章歡迎轉載,務必尊重版權註明連結來源)
2021-03-30 21:35:00 最後編修
2020-03-15 08:11:17 By
 

because wildfly sometimes stops for unknown reasons on cntos7,

I checked the log shown that mongo connection record might be a reason,

after some searching of documentation,

this is how to make ulimits setting works as following.

step 1:

if you wish to modify the system services, go to /usr/lib/systemd/system,

find your service, for example, mongod.service

modify that file, under the [service] tag,

adding lines include:

# open files
LimitNOFILE=32000
# processes/threads
LimitNPROC=32000

step 2:

systemctl daemon-reload && systemctl restart mongod

then the change of ulimits took effect.

if you wish to modify some process other than system services, like wildfly

make a new file under /etc/security/limits.d/

named a file after that process, like 100-wildfly.conf, the number shown in front of a file indicated its group numeratically,

adding lines below:

wildfly soft nproc 32000
wildfly hard nproc 32000
wildfly soft nofile 32000
wildfly hard nofile 32000

then restart your process to take effect on that modification.

notice: you can enlarge the number over examples above, maybe for 64000, if your system has more physical memories to work with it.

 

 

END

你可能感興趣的文章

JIRA instance migration phase2: install node.js and chinese fonts install node.js to export PDF though BigPicture plugin

how to modify a service's ulimits on host OS modify ulimits

JIRA instance migration phase3: upgrading jira trying to upgrade jira from 7.6.1 to 8.x

how to rename git branch rename git branch

import csv into jira to create mass issues import csv into jira to create mass issues

how to adjust text line spacing on macos terminal it's a annoying detail while generating qrcode on terminal

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

netbeans IDE scaling on Win10 how to change scaling not to see tiny little letters in the IDE

a function that takes an array of integers and a target then added any two equals the target Write a function that takes an array of numbers (integers fo

repairing esxi guest system after power failure if centos7 guest system reboot failed after power failure