- 浏览: 1525141 次
- 性别:
- 来自: 厦门
文章分类
- 全部博客 (516)
- Java (49)
- Java/Struts 2.0 (25)
- Java/Spring、Spring MVC (11)
- Java/Quartz (3)
- Java/Lucene (6)
- Java/Hibernate (19)
- Java/openJPA (7)
- Java/DWR (7)
- Java/Security、Spring Security/OAuth2 (6)
- Java/Threading (9)
- Java/XML (22)
- java/design pattern (4)
- Android (2)
- JavaScript (46)
- jquery (3)
- DB/MySQL (23)
- DB/Oracle (16)
- PHP (25)
- CSS (20)
- Linux (38)
- C/C++、DLL、Makefile、VC++ (31)
- 正则 (9)
- Eclipse (4)
- 安全、网络等概念 (25)
- 集群 (7)
- 网页 (5)
- 视频\音频 (1)
- HTML (6)
- 计算机数学/算法 (3)
- Virtualbox (1)
- LDAP (2)
- 数据挖掘 (6)
- 工具破解 (1)
- 其他 (13)
- Mail (1)
- 药材 (3)
- 游戏 (2)
- hadoop (13)
- 压力测试 (3)
- 设计模式 (3)
- java/Swing (2)
- 缓存/Memcache (0)
- 缓存/Redis (1)
- OSGI (2)
- OSGI/Gemini (0)
- 文档写作 (0)
- java/Servlet (3)
- MQ/RabbitMQ (2)
- MQ/RocketMQ (0)
- MQ/Kafka (1)
- maven (0)
- SYS/linux (1)
- cache/redis (1)
- DB/Mongodb (2)
- nginx (1)
- postman (1)
- 操作系统/ubuntu (1)
- golang (1)
- dubbo (1)
- 技术管理岗位 (0)
- mybatis-plus (0)
最新评论
-
pgx89112:
大神,请赐我一份这个示例的项目代码吧,万分感谢,1530259 ...
spring的rabbitmq配置 -
string2020:
不使用增强器 怎么弄?
OpenJPA的增强器 -
孟江波:
学习了,楼主,能否提供一份源代码啊,学习一下,十分感谢!!!4 ...
spring的rabbitmq配置 -
eachgray:
...
spring-data-redis配置事务 -
qljoeli:
学习了,楼主,能否提供一份源代码啊,学习一下,十分感谢!!!1 ...
spring的rabbitmq配置
http://blogs.opcodesolutions.com/roller/java/entry/solve_java_lang_outofmemoryerror_java
An OOM or OOME (OutOfMemoryError) simply means that the JVM ran out of memory. When this occurs, you basically have 2 choices:
- Allow the JVM to use more memory using the -Xmx VM argument. For instance, to allow the JVM to use 1 GB (1024 MB) of memory:
java -Xmx1024m ...
- Improve/Fix the application so that it uses less memory
In many cases, like in the case of a memory leak, the second option is the only sound choice. A memory leak happens when the application keeps more and more references to objects and never releases them. The garbage collector will therefore never collect those objects and less and less free memory will be available until we reach the point where not enough free memory is available for the application to function normally. At this point, the JVM will throw an OOM.
A memory leak can be very latent. For instance, the application might behave flawlessly during development and QA. However, it suddenly throws a OOM after several days in production at customer site. To solve that issue, you first need to find the root cause of it. The root cause can be very hard to find in development if it cannot be reproduced in-house. Here are the steps to follow in order to find the root cause and fix that issue:
- Start the application with the VM argument -XX:+HeapDumpOnOutOfMemoryError . This will tell the VM to produce a heap dump when a OOM occurs:
java -XX:+HeapDumpOnOutOfMemoryError ...
- Reproduce the problem. Well, if you cannot reproduce in dev, you will have to use the production environment.
- Use VisualVM to read the heap dump file and diagnose the issue.
First of all, a heap dump is the dump of the heap (duh!). It will allow you to navigate the heap and see what objects use all the heap memory and which are the ones that still keep a reference on them, and so on and so forth. This will give you very strong hints and you will (hopefully) be able to find the root cause of the problem. The problem could be a cache that grows indefinitely, a list that keeps collecting business-specific data in memory, a huge request that tries to load almost all data from database in memory, etc.
Once you know the root cause of the problem, you can elaborate solutions to fix it. In case of a cache that grows indefinitely, a good solution could be to set a reasonable limit to that cache. In case of a query that tries to load almost all data from database in memory, you may have to change the way you manipulate data; you could even have to change the behavior of some functionalities of the application.
If you do not want to wait for a OOM or if you just want to see what is in memory, you can still generate heap dump. To manually trigger a heap dump, you have 2 choices:
- Use VisualVM , right-click on the process on the left pane and select Heap Dump
- If you do not have a graphical environment and can't use vnc (VisualVM needs a graphical environment), use jps and jmap to generate the heap dump file. Then copy the file to your workstation and use VisualVM to read the heap dump (File -> Load...):
user@host:~$ jps
20198
21734 WordFinder
21921 Jps
21168 Main
user@host:~$ jmap -dump:live,format=b,file=heap.bin 21734
Dumping heap to /home/user/heap.bin ...
Heap dump file created
Here is what VisualVM looks with a heap dump:
Alternatively, you can also use jhat to read heap dumps.
发表评论
-
HttpRequestClient
2018-11-21 17:45 595http请求工具 public class WebCon ... -
Spring boot 环境下配置CKEditor添加google map
2017-07-05 14:39 1254本文档基于已经搭建好基础ckeditor的环境上。如:ht ... -
post json
2015-12-30 12:35 536方法一: public static String doP ... -
maven打包成可执行的jar包(package a runnable jar)
2015-04-23 22:01 2216第一步:利用maven-jar-plugin生成当前工程的 ... -
自定义ObjectMapper
2015-03-02 16:57 7763d import java.io.IOExcept ... -
JsonObjectMapper
2015-02-05 10:41 1393import com.fasterxml.jackson. ... -
HttpServletRequestWrapper
2014-10-12 08:15 589请求提交后替换HTML字符 import javax.s ... -
配置javamelody
2014-09-12 14:03 1273参考后面地址修改整理。http://my.oschina.n ... -
getTrace()
2014-08-06 09:14 560/** * 将e.printStackTrace() ... -
获取java对象在内存的地址
2014-07-28 14:59 2863引用stackflow的文章:http://stackove ... -
JMeter入门:Java Request实例
2014-05-08 15:41 2348转自:http://softtest.chin ... -
解决在IE下下载时文件名乱码
2014-01-09 11:24 1053String agent = request.getHead ... -
第一节:编译自定义的Hadoop核心包,去除用户权限检查
2013-11-30 11:59 1062本文参考eclipse连接远程hadoop集群开发时0700 ... -
第二节:win 7下编译eclispe hadoop plugin
2013-11-29 19:12 832本文参照后面地址的Linux编译方式:http: ... -
使用log4j为Tomcat输出日志
2013-11-01 16:42 10339转自:http://hi.baidu.com/y ... -
xStream开发HTTP的XML内容
2013-07-03 09:58 10531、编写自定义XPPDriver代码: package ... -
HttpURLConnection or URLConnection post xml content to web server
2013-05-31 01:56 2058客户端示例1: package client; ... -
java nio学习笔记
2013-03-21 21:41 0直接缓冲区被用于与通道和固有I/O例程交互。它们 ... -
Jsch使用
2012-12-10 17:07 2543Jsch shell模式下的代码示例: 参考: ... -
Exe4j破解_Exe4j注册码
2012-12-06 17:35 33550exe4j是个很好的打包利器,官方下载地址:http://ww ...
相关推荐
神奇宝贝(PokemonGo)基于Jetpack+MVVM+Repository设计模式+Data
用于试用 Dev Containers 的 Python 示例项目试用开发容器Python开发容器是一个具有明确定义的工具/运行时堆栈及其先决条件的运行容器。您可以使用GitHub Codespaces或Visual Studio Code Dev Containers试用开发容器。这是一个示例项目,您可以通过几个简单的步骤尝试任一选项。我们还有各种其他vscode-remote-try-*示例项目。注意如果您已经有代码空间或开发容器,则可以跳至“要尝试的事情”部分。设置开发容器GitHub Codespaces请按照以下步骤在 Codespace 中打开此示例单击代码下拉菜单。单击Codespaces选项卡。单击主屏幕上的“创建代码空间”。有关创建代码空间的更多信息,请访问GitHub 文档。VS Code 开发容器如果您已安装 VS Code 和 Docker,则可以单击上方或此处的徽章开始使用。单击这些链接将导致 VS Code 根据需要自动安装 Dev Containers 扩展,将源代码克隆到容器卷中,并启动开发容器以供使用。按
springboot vue3前后端分离
数学建模-神经网络算法 lecture 11 线性随机系统辨识示例 共9页.pptx
优质粳稻生产技术规程.docx
算法 - Python 目录灵感与动力贡献指南从这里开始所有算法均用 Python 3 实现(用于教育)这些实现仅用于学习目的。如果您想贡献更有效的解决方案,请随时打开问题并提交您的解决方案。灵感你可以在LeetCode 算法中寻找要实现的算法若要贡献,请确保算法尚未提交!请确保在您的 PR 中添加问题编号。贡献指南文件夹和文件请确保你的文件位于 -Folder 中LeetCode,并且命名如下 0001_TwoSum.py-> LeetCode 问题的 4 位数字、下划线、LeetCodeName开放问题当您打开问题时,请确保问题尚未实现(查看代码/Leetcode 以获取问题编号)。现有问题打开的问题将被关闭,并且对此问题的 PR 被标记为垃圾邮件 。打开问题的贡献者将被优先分配到该问题。如果大约 7 天内没有 PR,则问题将分配给另一个贡献者。拉取请求只有与问题相结合并符合命名约定(参见文件夹和文件)的 Pull 请求才会被合并!如果 PR 中没有加入问题,您的 PR 将被标记为垃圾邮件并关闭。如果您的代码未通
用于接收和交互来自 Slack 的 RTM API 的事件的框架python-rtmbot此项目不再处于积极开发阶段。如果您刚刚开始,我们建议您先查看Python SDK。如果您一直在使用此项目,我们只会解决关键问题(例如安全问题),但我们建议您计划迁移到 Python SDK。您仍然可以提交问题并向我们寻求帮助! 如果您有兴趣在未来维护此软件包,请联系我们 一个用 Python 编写的 Slack 机器人,通过 RTM API 连接。Python-rtmbot 是一个机器人引擎。任何了解Slack API和 Python的人都应该熟悉插件架构。配置文件格式为 YAML。该项目目前处于 1.0 之前的版本。因此,您应该计划不时进行重大更改。对于任何重大更改,我们将在 1.0 之前的版本中调整次要版本。(例如 0.2.4 -> 0.3.0 意味着重大更改)。如果稳定性很重要,您可能希望锁定特定的次要版本)与 webhook 的一些区别不需要网络服务器来接收消息可以回复用户的直接消息以 Slack 用户(或机器人)身份登录机器人用户必须被邀请加入频道
基于django的音乐推荐系统.zip
北京理工大学<Python机器学习应用>超详细学习笔记和代码注释(未完待续)
kernel-5.15-rc7.zip
神经网络-DenseNet网络结构
rbac组件(基于角色的权限控制)
C++ Vigenère 密码(解密代码)
数学建模培训资料 数学建模实战题目真题答案解析解题过程&论文报告 杭州消防设置-对杭州市消防局设置的研究 共8页.pdf
老年用品产品推广目录分类表.docx
本项目是基于Python的期货程序化交易系统的设计与实现,旨在为计算机相关专业学生提供一个实践性强、贴近实际应用场景的项目案例。通过这一项目,学生们能够深入了解程序化交易的基本原理和实现方法,同时锻炼自身的编程技能、数据分析能力以及金融市场的洞察力。 项目的主要功能包括:自动收集和处理市场数据、基于预设策略进行交易决策、实时执行交易指令、监控交易风险以及生成详细的交易报告。系统采用模块化设计,主要包括数据采集模块、策略执行模块、交易执行模块和风险管理模块,各个模块之间通过明确的接口进行交互。项目采用的编程语言为Python,利用其强大的数据处理库和机器学习库,保证了系统的灵活性和扩展性。开发这一项目的目的是让学生们在实践中学习和掌握程序化交易的核心技术,提升其在金融科技领域的就业竞争力。
基于java的校园失物招领平台设计与实现.docx
Javascript Ninja 课程JavaScript Ninja 课程Inscreva-se agora mesmo e ganhe 10% de desconto!Como tirar dúvidas sobre 或 conteúdo do curso访问问题页面Pesquise nas发出abertas e fechadas, se a mesma dúvida já foi postadaSe não foi, crie uma nova issues , coloque um titulo que tenha a ver com a sua dúvida, e descreva-a com o maior nível detalhes possíveis, para que possamos te ajudar:)摘要Veja o sumário completo do curso aqui。赞同!:D
solid.python通过示例在 Python 中解释SOLID 原则。单一职责原则开放/封闭原则里氏替换原则接口隔离原则依赖倒置原则
公交信息在线查询系统 微信小程序+SSM毕业设计 源码+数据库+论文+启动教程 项目启动教程:https://www.bilibili.com/video/BV1BfB2YYEnS