Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: fix direct buffer OOM #2175

Merged
merged 12 commits into from
Jan 23, 2020
Merged

bugfix: fix direct buffer OOM #2175

merged 12 commits into from
Jan 23, 2020

Conversation

slievrly
Copy link
Member

@slievrly slievrly commented Jan 13, 2020

Signed-off-by: slievrly slievrly@163.com

Ⅰ. Describe what this PR did

bugfix: fix direct buffer OOM

Ⅱ. Does this pull request fix one issue?

fix #2164

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Signed-off-by: slievrly <slievrly@163.com>
@codecov-io
Copy link

codecov-io commented Jan 13, 2020

Codecov Report

Merging #2175 into develop will decrease coverage by 0.01%.
The diff coverage is 14.28%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2175      +/-   ##
=============================================
- Coverage      53.16%   53.14%   -0.02%     
+ Complexity      2515     2513       -2     
=============================================
  Files            485      485              
  Lines          15346    15348       +2     
  Branches        1770     1770              
=============================================
- Hits            8158     8156       -2     
- Misses          6403     6406       +3     
- Partials         785      786       +1
Impacted Files Coverage Δ Complexity Δ
...eata/server/session/db/DataBaseSessionManager.java 35% <ø> (+1.12%) 12 <0> (ø) ⬇️
...ava/io/seata/core/constants/ConfigurationKeys.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...ava/io/seata/core/rpc/netty/NettyServerConfig.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...re/properties/registry/ConfigApolloProperties.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...o/seata/server/coordinator/DefaultCoordinator.java 49.8% <50%> (-0.39%) 30 <0> (-1)
...in/java/io/seata/server/session/GlobalSession.java 84.13% <0%> (-0.49%) 67% <0%> (-1%)

@lbysimun
Copy link

This can be useful by using the newest snapshot.

@guojingyinan219
Copy link
Contributor

已验证,oom问题已解决

3 similar comments
@wangloyal
Copy link

已验证,oom问题已解决

@fenghuanfun
Copy link

已验证,oom问题已解决

@HongKing
Copy link

已验证,oom问题已解决

Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

true,
WORKER_THREAD_SIZE,
WORKER_THREAD_SIZE,
2048 * 64,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[2048 * 64] Is this property set too large, 16 times the default value?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.0.0版本的默认配置里面。worker-thread-size为配置。默认为netty的线程数是cpu*2。
0.8.0版本的配置文件里面transport.thread-factory.worker-thread-size=8
netty的内存限制已经超过配置的最大直接内存数。所以1.0.0版本在cpu很多的机器上,缺省配置很快就能复现OOM的bug
去掉这段代码,使用netty缺省的配置和参数。netty根据最大直接内存,chunkSize和maxOrder,计算出有效的nDirectArena和nHeapArena
image

Copy link
Contributor

@ph3636 ph3636 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@zjinlei zjinlei added this to the 1.1.0 milestone Jan 15, 2020
@zjinlei zjinlei added the Do Not Merge Do not merge into develop label Jan 22, 2020
@zjinlei
Copy link
Contributor

zjinlei commented Jan 22, 2020

Do not merge for now, collect more feedback.

Copy link
Member

@lovepoem lovepoem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zjinlei zjinlei closed this Jan 23, 2020
@zjinlei zjinlei reopened this Jan 23, 2020
@lovepoem lovepoem merged commit 3eeda69 into apache:develop Jan 23, 2020
booogu pushed a commit to booogu/seata that referenced this pull request Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do Not Merge Do not merge into develop
Projects
None yet
Development

Successfully merging this pull request may close these issues.

高配服务器出现OutOfDirectMemoryError异常