- 浏览: 2652385 次
- 来自: 杭州
文章分类
- 全部博客 (1188)
- webwork (4)
- 网摘 (18)
- java (103)
- hibernate (1)
- Linux (85)
- 职业发展 (1)
- activeMQ (2)
- netty (14)
- svn (1)
- webx3 (12)
- mysql (81)
- css (1)
- HTML (6)
- apache (3)
- 测试 (2)
- javascript (1)
- 储存 (1)
- jvm (5)
- code (13)
- 多线程 (12)
- Spring (18)
- webxs (2)
- python (119)
- duitang (0)
- mongo (3)
- nosql (4)
- tomcat (4)
- memcached (20)
- 算法 (28)
- django (28)
- shell (1)
- 工作总结 (5)
- solr (42)
- beansdb (6)
- nginx (3)
- 性能 (30)
- 数据推荐 (1)
- maven (8)
- tonado (1)
- uwsgi (5)
- hessian (4)
- ibatis (3)
- Security (2)
- HTPP (1)
- gevent (6)
- 读书笔记 (1)
- Maxent (2)
- mogo (0)
- thread (3)
- 架构 (5)
- NIO (5)
- 正则 (1)
- lucene (5)
- feed (4)
- redis (17)
- TCP (6)
- test (0)
- python,code (1)
- PIL (3)
- guava (2)
- jython (4)
- httpclient (2)
- cache (3)
- signal (1)
- dubbo (7)
- HTTP (4)
- json (3)
- java socket (1)
- io (2)
- socket (22)
- hash (2)
- Cassandra (1)
- 分布式文件系统 (5)
- Dynamo (2)
- gc (8)
- scp (1)
- rsync (1)
- mecached (0)
- mongoDB (29)
- Thrift (1)
- scribe (2)
- 服务化 (3)
- 问题 (83)
- mat (1)
- classloader (2)
- javaBean (1)
- 文档集合 (27)
- 消息队列 (3)
- nginx,文档集合 (1)
- dboss (12)
- libevent (1)
- 读书 (0)
- 数学 (3)
- 流程 (0)
- HBase (34)
- 自动化测试 (1)
- ubuntu (2)
- 并发 (1)
- sping (1)
- 图形 (1)
- freemarker (1)
- jdbc (3)
- dbcp (0)
- sharding (1)
- 性能测试 (1)
- 设计模式 (2)
- unicode (1)
- OceanBase (3)
- jmagick (1)
- gunicorn (1)
- url (1)
- form (1)
- 安全 (2)
- nlp (8)
- libmemcached (1)
- 规则引擎 (1)
- awk (2)
- 服务器 (1)
- snmpd (1)
- btrace (1)
- 代码 (1)
- cygwin (1)
- mahout (3)
- 电子书 (1)
- 机器学习 (5)
- 数据挖掘 (1)
- nltk (6)
- pool (1)
- log4j (2)
- 总结 (11)
- c++ (1)
- java源代码 (1)
- ocr (1)
- 基础算法 (3)
- SA (1)
- 笔记 (1)
- ml (4)
- zokeeper (0)
- jms (1)
- zookeeper (5)
- zkclient (1)
- hadoop (13)
- mq (2)
- git (9)
- 问题,io (1)
- storm (11)
- zk (1)
- 性能优化 (2)
- example (1)
- tmux (1)
- 环境 (2)
- kyro (1)
- 日志系统 (3)
- hdfs (2)
- python_socket (2)
- date (2)
- elasticsearch (1)
- jetty (1)
- 树 (1)
- 汽车 (1)
- mdrill (1)
- 车 (1)
- 日志 (1)
- web (1)
- 编译原理 (1)
- 信息检索 (1)
- 性能,linux (1)
- spam (1)
- 序列化 (1)
- fabric (2)
- guice (1)
- disruptor (1)
- executor (1)
- logback (2)
- 开源 (1)
- 设计 (1)
- 监控 (3)
- english (1)
- 问题记录 (1)
- Bitmap (1)
- 云计算 (1)
- 问题排查 (1)
- highchat (1)
- mac (3)
- docker (1)
- jdk (1)
- 表达式 (1)
- 网络 (1)
- 时间管理 (1)
- 时间序列 (1)
- OLAP (1)
- Big Table (0)
- sql (1)
- kafka (1)
- md5 (1)
- springboot (1)
- spring security (1)
- Spring Boot (3)
- mybatis (1)
- java8 (1)
- 分布式事务 (1)
- 限流 (1)
- Shadowsocks (0)
- 2018 (1)
- 服务治理 (1)
- 设计原则 (1)
- log (0)
- perftools (1)
最新评论
-
siphlina:
课程——基于Python数据分析与机器学习案例实战教程分享网盘 ...
Python机器学习库 -
san_yun:
leibnitz 写道hi,我想知道,无论在92还是94版本, ...
hbase的行锁与多版本并发控制(MVCC) -
leibnitz:
hi,我想知道,无论在92还是94版本,更新时(如Puts)都 ...
hbase的行锁与多版本并发控制(MVCC) -
107x:
不错,谢谢!
Latent Semantic Analysis(LSA/ LSI)算法简介 -
107x:
不错,谢谢!
Python机器学习库
今天发现线上jython load很高,查看jstack,jstat都没有异常情况,本来想通过jmap,结果提示我too many open files,应该是网络链接的问题,发现果然大量close_wait,估计是因为长链接,nginx重启的时候,java这头没有关闭,重启之后搞定。
Too many open files经常在使用linux的时候出现,大多数情况是您的程序没有正常关闭一些资源引起的,所以出现这种情况,请检查io读写,socket通讯等是否正常关闭。
如果检查程序没有问题,那就有可能是linux默认的open files值太小,不能满足当前程序默认值的要求,比如数据库连接池的个数,tomcat请求连接的个数等。。。
查看当前系统open files的默认值,可执行:
[root@pororo script]# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 128161 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited open files (-n) 800000 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 128161 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
如果发现open files项比较小,可以按如下方式更改:
1. 检查/proc/sys/fs/file-max文件来确认最大打开文件数已经被正确设置。
cat /proc/sys/fs/file-max
如果设置值太小,修改文件/etc/sysctl.conf的变量到合适的值。这样会在每次重启之后生效。 如果设置值够大,跳过这一步。
echo 2048 > /proc/sys/fs/file-max
编辑文件/etc/sysctl.conf,插入下行:
-
fs.file-max =
8192
2. 在/etc/security/limits.conf文件中设置最大打开文件数, 下面是一行提示:
#<domain> <type> <item> <value>
添加如下这行:
-
* - nofile
8192
这行设置了每个用户的默认打开文件数为2048。
注意"nofile"项有两个可能的限制措施。就是<type>项下的hard和soft。
要使修改过得最大打开文件数生效,必须对这两种限制进行设定。 如果使用"-"字符设定<type>,
则hard和soft设定会同时被设定。
硬限制表明soft限制中所能设定的最大值。 soft限制指的是当前系统生效的设置值。 hard限制值可以被普通用户降低。但是不能增加。 soft限制不能设置的比hard限制更高。 只有root用户才能够增加hard限制值。
当增加文件限制描述,可以简单的把当前值双倍。 例子如下, 如果你要提高默认值1024, 最好提高到2048, 如果还要继续增加, 就需要设置成4096。
最后用ulimit -a再次查看,open files的值,没什么问题的话,就已经改过来了。
发表评论
-
spring-cloud问题排查
2019-11-18 14:58 513### 问题1报错,应用无法启动 org.springfra ... -
log4j 和slf4j的 类冲突解决
2018-07-14 16:11 19781. 检查 log4j 和slf4j的冲突 pub ... -
HikariPool-1 - Connection is not available, request timed out after
2018-05-07 19:13 6673在开发中遇到 HikariPool-1 - Conn ... -
java.io.StreamCorruptedException: invalid stream header: EFBFBDEF
2018-05-03 16:54 2403Java代码 publi ... -
log4j问题总结-加载配置文件
2014-08-20 16:34 1063今天遇到log4j的log4j.properties没有生效 ... -
一个诡异的类冲突错误排查记录
2014-08-13 10:44 815今天遇到一个问题排查了很久,记录一下。 问题原因,日常环境 ... -
tomcat7.0.26的连接数控制bug的问题排查
2014-04-23 19:51 1709今儿线上一台机器,监控一直在告警, mtophost[CM ... -
tomcat,jboss,jetty访问出现404错误问题记录
2014-04-21 19:51 1690原因是WEB-INF下面缺少jboss-web.xml ... -
记录Hadoop native libraries无法load的问题
2014-04-10 19:45 2297今天遇到一个错误,在本地往Hadoop写文件的时候报了一个错 ... -
Exception性能问题
2014-01-24 22:25 13071.从Exception往上介绍相关结构、代码 ... -
spring加载xml去远程获取dtd验证xml的问题
2014-01-24 11:57 899最近遇到spring 加载xml去远程获取dtd,但外网不 ... -
hbase查询超时导致的错误
2013-12-25 19:53 2714今天上线跑一个hbase程序出现如下错误: org.ap ... -
hbase无法启动问题
2013-12-24 23:53 927今天遇到hbase无法启动,找了很久,才发现可能是data ... -
web.xml配置注意点
2013-12-19 20:29 6391. servlet启动初始化 servlet默认只有访 ... -
Linux服务器Cache占用过多内存导致系统内存不足问题的排查解决
2013-12-17 23:22 3909作者: 大圆那些事 | 文章可以转载,请以超链接形式标明文章 ... -
linger close用法
2013-12-13 14:18 964Linux下tcp连接断开的时候调用close()函数,有 ... -
log4j-over-slf4的log4j Loger加载问题
2013-12-11 00:19 5780log4j-over-slf4是通过定义和log4j同包名 ... -
log4j,slf4j,logback问题总结
2013-12-10 18:12 6527ls4j初始化过程参考:l ... -
maven 小结(打包和单元测试)
2013-12-04 11:53 6851. 如何把一个jar和他依赖的包打包成一个 使用mave ... -
solr load比较高
2013-12-02 09:50 1069最近solr的load比较高,通过jstack查看: 写 ...
相关推荐
MySQL错误“Too many connections”是数据库用户在尝试建立新的连接时遇到的一个常见问题。这个错误表明MySQL服务器已经达到了其允许的最大并发连接数,通常默认设置为100个。当数据库连接未正确关闭,或者应用程序...
12. (D) The shop that is **close** to my home is often **closed** at 9:30 p.m. "close"表示“靠近”,"closed"表示“关着的”。 13. (D) The fifth lesson **is** very difficult. 序数词前加"The",且谓语...
To disable this feature set this option to empty value ;user_ini.filename = ; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) ;user_ini.cache_ttl = ...
It is up to the application to define what consistency means, and isolation in some form is needed to achieve consistent results. SQL Server uses locking to achieve isolation. Definition of ...
10. 固定搭配:"We can’t wait to see our teacher...",can't wait to do sth.表示迫不及待要做某事。 11. 动词不定式做主语:"It took me two hours to walk to the hospital.",it作形式主语,真正的主语是不定...
- Changed the Memory test to wait for the Video Playback test and 3D test to allow memory allocation for these tests. - Minor changes to the No operation error watchdog timer for the CD and Hard ...
In Dbf.Net you don't have to write any code, if you don't want to wait for the garbage collector to collect your individual you can call SaveChanges. Dbf.Net ADO.Net Collapse Copy Codevoid ...
Symbolhandler: When the symbolhandler now waits till it's done, it won't wait for the structures to be parsed anymore Additions and Changes: Lua Engine: Added autocomplete DLL injection: On DLL ...
4. **情态动词**:如"I can’t wait to try the new hat."、"It is impossible for me to tell you everything.",这里的"can't wait to do"表示迫不及待要做某事,"it is impossible for sb. to do"表示某人做某事...
Many of these data centers are located in, or close to, lower tier ISPs. Therefore, when Google delivers content to a user, it often can bypass higher tier ISPs. What motivates content providers to ...
having to wait for the R&D department to deliver. These customized features are not added on as scripts to be interpreted slowly but as fully compiled and integrated functions of the system. Once ...
5)....Fixed: Dialog auto-close timer may reset without user input 6)....Fixed: Possible hang when quickly loading/unloading EurekaLog-enabled DLL 7)....Fixed: Possible hang in COM DLLs 8)....Fixed: ...
SCTP One-to-Many-Style Streaming Echo Client: main Function Section 10.4. SCTP Streaming Echo Client: str_cli Function Section 10.5. Exploring Head-of-Line Blocking Section 10.6. Controlling ...
- bugfix: close images on exit - SB16 - converted the sound output module stuff to the new 'soundmod' plugin - SF patches applied [3164945] hack to compile under WIN64 by Darek Mihocka and ...
The interface gives standard access to as many features as possible, while leaving room for future ex¬ten-sions and vendor-specific customizations. Applications should be able to get the tablet ...
I can't wait to see everyone's smiling faces and make this a memorable day for all of us!" 以上就是对这份小学英语同步练习课时练的详尽解析,涵盖了动词变化、词汇应用和写作实践,旨在帮助学生全面掌握本...
15. 并列连词误用:“So it was still too close to the water”中,“So”应改为“Yet”,表示转折。 16. 代词误用:“the men threw away most of his clothes”中,“his”应改为“their”,因为主语是复数。 ...
5. 介词:"near"或"close to"表示与朋友住得近。 6. 名词:"flat"在此处指公寓楼的单元。 7. 动词:"help"表示王梅乐意帮助别人学习英语。 8. 连词:"but"可以连接两个句子,表示转折,如"Chen Fang does not ...
- "I have told you many times not to do that." 强调重复的警告和规则的重要性。 - "Don’t sit too close to the TV." 关注孩子的视力保护。 - "It’s nothing. It’s just a little cut." 安慰孩子处理小伤。...