Supervisord和ulimit到java应用程序 [英] Supervisord and ulimit to java app

查看:506
本文介绍了Supervisord和ulimit到java应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用supervisord来启动我的Java应用程序。应用程序工作正常,但我的ulimit nofiles没有设置。我可以使用debian在一台机器上完成。但是在第二台机器上存在此配置无效的问题。基本上,我用脚本启动我的应用程序:

I am using supervisord to start my java app. The application is working OK, but my ulimit nofiles is not set. I could do it in one machine, using debian. but there is a problem on the second machine that this configuration is not working. Basically, I start my app with a script:

#!/bin/sh

iscsiJar="/mnt/cache/jscsi/udrive.jar"

ulimit -SHn 32768

# função para iniciar a aplicação
java -XX:MaxHeapFreeRatio=70 -Xmx2048M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump.hprof -jar $iscsiJar

但我的命令cat / proc / 4171 / limits一直说:

But my command cat /proc/4171/limits keeps saying:

最大打开文件4096 4096个文件

Max open files 4096 4096 files

任何提示?我已经在互联网上到处搜索....我可以在这个问题上尝试这种方式> nohup按天创建新文件nohup.out

Any hint? I already search everywhere at internet.... I could try this way on this question> nohup create new files nohup.out by day

推荐答案

如果有人还在寻找解决方案为此,请尝试在supervisord配置文件中设置: minfds 参数:
http://supervisord.org/configuration.html#supervisord-section-values

In case someone is still looking for a solution for that, try setting: minfds parameter within supervisord configuration file: http://supervisord.org/configuration.html#supervisord-section-values

请记住在配置更改后重新启动supervisord。

Remember to restart the supervisord after configuration change.

这篇关于Supervisord和ulimit到java应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆