linux の XXX打开文件过多的问题处理思路

问题描述:
今天项目突然蹦了,客户反馈登录不进去。
登录一看如下报错。拉取 tomcat 日志发现也都是在跑某个 pdf 预览接口提示打开文件过多。
avatar

解决办法:
`ulimit -n

# 临时修改,重启失效

ulimit -HSn 65536

# 永久解决

vim /etc/security/limits.conf

# 添加如下的行

  • soft nproc 65536
  • hard nproc 65536
  • soft nofile 65536
  • hard nofile 65536`
Author

wandan

Posted on

2024-08-07

Updated on

2024-08-07

Licensed under

You need to set install_url to use ShareThis. Please set it in _config.yml.
You forgot to set the business or currency_code for Paypal. Please set it in _config.yml.

Comments

You forgot to set the shortname for Disqus. Please set it in _config.yml.
You need to set client_id and slot_id to show this AD unit. Please set it in _config.yml.