You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "justinwwhuang (via GitHub)" <gi...@apache.org> on 2024/08/26 09:06:39 UTC
[PR] [INLONG-10889][Agent] When the oom is detected, the process exits [inlong]
justinwwhuang opened a new pull request, #10891:
URL: https://github.com/apache/inlong/pull/10891
Fixes #10889
### Motivation
When the oom is detected, the process exits
### Modifications
Add oom handling to several main threads to catch exceptions
### Verifying this change
*(Please pick either of the following options)*
- [ ] This change is a trivial rework/code cleanup without any test coverage.
- [ ] This change is already covered by existing tests, such as:
*(please describe tests)*
- [ ] This change added tests and can be verified as follows:
*(example:)*
- *Added integration tests for end-to-end deployment with large payloads (10MB)*
- *Extended integration test for recovery after broker failure*
### Documentation
No doc needed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-10889][Agent] When the oom is detected, the process exits [inlong]
Posted by "justinwwhuang (via GitHub)" <gi...@apache.org>.
justinwwhuang merged PR #10891:
URL: https://github.com/apache/inlong/pull/10891
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-10889][Agent] When the oom is detected, the process exits [inlong]
Posted by "aloyszhang (via GitHub)" <gi...@apache.org>.
aloyszhang commented on code in PR #10891:
URL: https://github.com/apache/inlong/pull/10891#discussion_r1733815922
##########
inlong-agent/bin/agent-env.sh:
##########
@@ -45,17 +46,19 @@ else
fi
if [ -z "$AGENT_JVM_HEAP_OPTS" ]; then
- HEAP_OPTS="-Xmx512m -Xss512k"
+ HEAP_OPTS=" -Xmx2048m -Xms512m -Xss512k "
else
HEAP_OPTS="$AGENT_JVM_HEAP_OPTS"
fi
-GC_OPTS="-XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:InitiatingHeapOccupancyPercent=60 -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8"
-LOG_OPTS="-Xloggc:$BASE_DIR/logs/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=20M"
+
+GVM_OPTS=" -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 "
+OOM_HANDLER=" -XX:OnOutOfMemoryError=$BASE_DIR/bin/oom.sh"
+GC_OPTS=" -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+TraceClassLoading -XX:InitiatingHeapOccupancyPercent=45 -XX:G1HeapRegionSize=16m -XX:G1MixedGCCountTarget=16 -XX:G1HeapWastePercent=10"
+LOG_OPTS=" -Xloggc:$BASE_DIR/logs/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=20M"
Review Comment:
`-XX:+PrintGCDetails -XX:+PrintGCDateStamps` should be GC_OPTS
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-10889][Agent] When the oom is detected, the process exits [inlong]
Posted by "aloyszhang (via GitHub)" <gi...@apache.org>.
aloyszhang commented on code in PR #10891:
URL: https://github.com/apache/inlong/pull/10891#discussion_r1731158238
##########
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/file/FileUtils.java:
##########
@@ -68,7 +68,7 @@ public static long getFileLastModifyTime(String fileName) {
try {
lastModify = Files.getLastModifiedTime(Paths.get(fileName)).toMillis();
} catch (IOException e) {
- LOGGER.error("getFileLastModifyTime error {}", e.getMessage());
+ LOGGER.error("getFileLastModifyTime error {}", e);
Review Comment:
```suggestion
LOGGER.error("getFileLastModifyTime error.", e);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-10889][Agent] When the oom is detected, the process exits [inlong]
Posted by "aloyszhang (via GitHub)" <gi...@apache.org>.
aloyszhang commented on code in PR #10891:
URL: https://github.com/apache/inlong/pull/10891#discussion_r1731157905
##########
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/file/FileUtils.java:
##########
@@ -58,7 +58,7 @@ public static long getFileCreationTime(String fileName) {
creationTime = Files.readAttributes(Paths.get(fileName), BasicFileAttributes.class).creationTime()
.toMillis();
} catch (IOException e) {
- LOGGER.error("getFileCreationTime error {}", e.getMessage());
+ LOGGER.error("getFileCreationTime error {}", e);
Review Comment:
```suggestion
LOGGER.error("getFileCreationTime error.", e);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org