byteayan commented on code in PR #509:
URL: https://github.com/apache/hugegraph-doc/pull/509#discussion_r4241652635


##########
content/en/docs/guides/hugegraph-docker-cluster.md:
##########
@@ -293,7 +293,29 @@ Standalone publishes only `8080` and `8088`; minimal 
HStore publishes `8620` (PD
 
 5. **Unexpected retained data**: `docker compose down` keeps named volumes. To 
delete topology data too, use `docker compose down -v`.
 
-**Runtime logs**: `docker logs <container-name>` (for example, `docker logs 
hg-pd0`) shows logs without entering containers. Standalone 
`hugegraph/hugegraph` sets `STDOUT_MODE=true` and sends service logs to stdout. 
The HStore `hugegraph/server` image does not set this variable: `docker logs` 
shows only entrypoint output; inspect `logs/hugegraph-server.log` inside the 
container for service logs.
+**Runtime logs**: `docker logs <container-name>` (for example, `docker logs 
hg-pd0`) shows logs without entering containers. In images built from current
+master, the PD, Store and both Server images (`hugegraph/hugegraph` and the 
HStore `hugegraph/server`) set `STDOUT_MODE=true` and send service logs to 
stdout.
+For the Server, WARN and above from Hadoop, ZooKeeper, SOFA, Netty and Commons 
also reaches stdout; INFO from Hadoop, Netty and Commons and the audit and
+slow-query logs stay in files, and ZooKeeper and SOFA log nothing below WARN. 
`/hugegraph-server/logs` holds `hugegraph-server.log`, JVM crash logs
+(`hs_err_pid*.log`) and out-of-memory heap dumps 
(`heapdump_*/java_pid*.hprof`, one directory per start, so the Server and the 
JVMs it starts get separate
+files). Both images declare `VOLUME /hugegraph-server`, so `docker restart` 
and a Compose recreate keep them; `docker compose down` leaves that anonymous 
volume
+behind unattached until `down -v` deletes it, so use a named volume or bind 
mount to keep them reachable. Kubernetes starts a new container on every 
restart, so

Review Comment:
   You're right, a later `down -v` only removes anonymous volumes of the 
containers it removes, so it can't reach a volume a plain `down` already 
orphaned. Fixed in e930212 (EN + CN): the guide now points to `docker volume 
prune` for that case and still recommends a named volume or bind mount. The 
same sentence in the server repo's `docker/README.md` was fixed in 
apache/hugegraph#3258 (27b27cef).
   



##########
content/cn/docs/guides/hugegraph-docker-cluster.md:
##########
@@ -293,7 +293,22 @@ curl -o /dev/null -w '%{http_code}\n' -u 
"admin:${HUGEGRAPH_ADMIN_PASSWORD}" \
 
 5. **数据在意料之外地保留了下来**:`docker compose down` 会保留命名卷。要同时删除该拓扑的数据,请使用 `docker 
compose down -v`
 
-**查看运行时日志**:使用 `docker logs <container-name>`(如 `docker logs 
hg-pd0`)可直接查看日志,无需进入容器。单机镜像 `hugegraph/hugegraph` 设置了 
`STDOUT_MODE=true`,其服务日志会输出到容器 stdout。`hugegraph/server`(HStore)镜像没有设置该变量,因此对 
HStore 拓扑的 Server 执行 `docker logs` 只能看到入口脚本的输出,其余内容需在容器内查看 
`logs/hugegraph-server.log`。
+**查看运行时日志**:使用 `docker logs <container-name>`(如 `docker logs 
hg-pd0`)可直接查看日志,无需进入容器。基于当前 master 构建的 PD、Store 以及两个 Server 
镜像(`hugegraph/hugegraph` 和 HStore 的
+`hugegraph/server`)都设置了 `STDOUT_MODE=true`,服务日志会输出到容器 stdout。对 Server 
而言,Hadoop、ZooKeeper、SOFA、Netty 和 Commons 的 WARN 及以上日志也会输出到 stdout;Hadoop、Netty 
和 Commons 的
+INFO 日志以及审计日志、慢查询日志仍只写入文件,ZooKeeper 和 SOFA 不输出 WARN 
以下的日志。`/hugegraph-server/logs` 中包含 `hugegraph-server.log`、JVM
+崩溃日志(`hs_err_pid*.log`)和内存溢出时的堆转储(`heapdump_*/java_pid*.hprof`,每次启动一个目录,Server 
及其启动的 JVM 分别写入各自的文件)。两个镜像都声明了 `VOLUME /hugegraph-server`,因此 `docker restart` 和
+Compose 重新创建容器都会保留这些文件;`docker compose down` 会留下这个匿名卷,但下一次 `up` 不会再挂载它,直到 
`down -v` 将其删除,所以请使用具名卷或绑定挂载来保留这些文件。Kubernetes 每次重启都会新建容器,因此需要在

Review Comment:
   You're right, a later `down -v` only removes anonymous volumes of the 
containers it removes, so it can't reach a volume a plain `down` already 
orphaned. Fixed in e930212 (EN + CN): the guide now points to `docker volume 
prune` for that case and still recommends a named volume or bind mount. The 
same sentence in the server repo's `docker/README.md` was fixed in 
apache/hugegraph#3258 (27b27cef).
   



##########
content/en/docs/guides/hugegraph-docker-cluster.md:
##########
@@ -293,7 +293,29 @@ Standalone publishes only `8080` and `8088`; minimal 
HStore publishes `8620` (PD
 
 5. **Unexpected retained data**: `docker compose down` keeps named volumes. To 
delete topology data too, use `docker compose down -v`.
 
-**Runtime logs**: `docker logs <container-name>` (for example, `docker logs 
hg-pd0`) shows logs without entering containers. Standalone 
`hugegraph/hugegraph` sets `STDOUT_MODE=true` and sends service logs to stdout. 
The HStore `hugegraph/server` image does not set this variable: `docker logs` 
shows only entrypoint output; inspect `logs/hugegraph-server.log` inside the 
container for service logs.
+**Runtime logs**: `docker logs <container-name>` (for example, `docker logs 
hg-pd0`) shows logs without entering containers. In images built from current
+master, the PD, Store and both Server images (`hugegraph/hugegraph` and the 
HStore `hugegraph/server`) set `STDOUT_MODE=true` and send service logs to 
stdout.
+For the Server, WARN and above from Hadoop, ZooKeeper, SOFA, Netty and Commons 
also reaches stdout; INFO from Hadoop, Netty and Commons and the audit and
+slow-query logs stay in files, and ZooKeeper and SOFA log nothing below WARN. 
`/hugegraph-server/logs` holds `hugegraph-server.log`, JVM crash logs
+(`hs_err_pid*.log`) and out-of-memory heap dumps 
(`heapdump_*/java_pid*.hprof`, one directory per start, so the Server and the 
JVMs it starts get separate
+files). Both images declare `VOLUME /hugegraph-server`, so `docker restart` 
and a Compose recreate keep them; `docker compose down` leaves that anonymous 
volume
+behind unattached until `down -v` deletes it, so use a named volume or bind 
mount to keep them reachable. Kubernetes starts a new container on every 
restart, so
+mount an `emptyDir` or a PersistentVolumeClaim at `/hugegraph-server/logs`. 
Give each pod its own volume, or a per-pod directory on a shared PVC
+(`subPathExpr: $(POD_NAME)`, with `POD_NAME` passed in from `metadata.name` 
through the Downward API; the Helm chart sets neither): crash files get distinct
+names, but the log files themselves have fixed names. The Helm chart does not 
mount a logs volume yet. A heap dump can be as large as the JVM heap, and every
+start uses a new directory, so a Server that keeps running out of memory fills 
the volume; size it for the dumps you want to keep, keep it within any
+`ephemeral-storage` limit or `emptyDir` `sizeLimit` (eviction deletes the 
`emptyDir` with the dump), and do not use `medium: Memory`. The launcher never 
deletes

Review Comment:
   Added in e930212 (EN + CN): give the liveness probe enough slack 
(`failureThreshold` × `periodSeconds`) to outlast writing a heap dump, since a 
restart mid-dump leaves a truncated file.
   



##########
content/en/docs/quickstart/hugegraph/hugegraph-server.md:
##########
@@ -535,6 +535,25 @@ This indicates the successful creation of the sample graph.
 
 `bin/stop-hugegraph.sh` accepts `-m true|false` (default `true`), which 
controls whether the cron monitor task is removed along with the service.
 
+`bin/hugegraph-server.sh` puts `-XX:+HeapDumpOnOutOfMemoryError`, 
`-XX:HeapDumpPath` and `-XX:ErrorFile` first in `JAVA_TOOL_OPTIONS`, so whether 
or not

Review Comment:
   Qualified in e930212 (EN + CN): the sentence now says "with the exceptions 
below", which covers the quote/% logs path and starts that fail before Java 
runs.
   



##########
content/en/docs/guides/hugegraph-docker-cluster.md:
##########
@@ -293,7 +293,29 @@ Standalone publishes only `8080` and `8088`; minimal 
HStore publishes `8620` (PD
 
 5. **Unexpected retained data**: `docker compose down` keeps named volumes. To 
delete topology data too, use `docker compose down -v`.
 
-**Runtime logs**: `docker logs <container-name>` (for example, `docker logs 
hg-pd0`) shows logs without entering containers. Standalone 
`hugegraph/hugegraph` sets `STDOUT_MODE=true` and sends service logs to stdout. 
The HStore `hugegraph/server` image does not set this variable: `docker logs` 
shows only entrypoint output; inspect `logs/hugegraph-server.log` inside the 
container for service logs.
+**Runtime logs**: `docker logs <container-name>` (for example, `docker logs 
hg-pd0`) shows logs without entering containers. In images built from current
+master, the PD, Store and both Server images (`hugegraph/hugegraph` and the 
HStore `hugegraph/server`) set `STDOUT_MODE=true` and send service logs to 
stdout.
+For the Server, WARN and above from Hadoop, ZooKeeper, SOFA, Netty and Commons 
also reaches stdout; INFO from Hadoop, Netty and Commons and the audit and
+slow-query logs stay in files, and ZooKeeper and SOFA log nothing below WARN. 
`/hugegraph-server/logs` holds `hugegraph-server.log`, JVM crash logs
+(`hs_err_pid*.log`) and out-of-memory heap dumps 
(`heapdump_*/java_pid*.hprof`, one directory per start, so the Server and the 
JVMs it starts get separate

Review Comment:
   Added in e930212 (EN + CN): if the per-start directory can't be created, 
dumps go to `/hugegraph-server/logs` itself.
   



##########
content/en/docs/guides/hugegraph-docker-cluster.md:
##########
@@ -293,7 +293,29 @@ Standalone publishes only `8080` and `8088`; minimal 
HStore publishes `8620` (PD
 
 5. **Unexpected retained data**: `docker compose down` keeps named volumes. To 
delete topology data too, use `docker compose down -v`.
 
-**Runtime logs**: `docker logs <container-name>` (for example, `docker logs 
hg-pd0`) shows logs without entering containers. Standalone 
`hugegraph/hugegraph` sets `STDOUT_MODE=true` and sends service logs to stdout. 
The HStore `hugegraph/server` image does not set this variable: `docker logs` 
shows only entrypoint output; inspect `logs/hugegraph-server.log` inside the 
container for service logs.
+**Runtime logs**: `docker logs <container-name>` (for example, `docker logs 
hg-pd0`) shows logs without entering containers. In images built from current
+master, the PD, Store and both Server images (`hugegraph/hugegraph` and the 
HStore `hugegraph/server`) set `STDOUT_MODE=true` and send service logs to 
stdout.
+For the Server, WARN and above from Hadoop, ZooKeeper, SOFA, Netty and Commons 
also reaches stdout; INFO from Hadoop, Netty and Commons and the audit and
+slow-query logs stay in files, and ZooKeeper and SOFA log nothing below WARN. 
`/hugegraph-server/logs` holds `hugegraph-server.log`, JVM crash logs
+(`hs_err_pid*.log`) and out-of-memory heap dumps 
(`heapdump_*/java_pid*.hprof`, one directory per start, so the Server and the 
JVMs it starts get separate

Review Comment:
   Qualified in e930212 (EN + CN): separate files per JVM unless a JVM reuses 
an earlier PID from the same start.
   



##########
content/en/docs/quickstart/hugegraph/hugegraph-server.md:
##########
@@ -535,6 +535,27 @@ This indicates the successful creation of the sample graph.
 
 `bin/stop-hugegraph.sh` accepts `-m true|false` (default `true`), which 
controls whether the cron monitor task is removed along with the service.
 
+`bin/hugegraph-server.sh` puts `-XX:+HeapDumpOnOutOfMemoryError`, 
`-XX:HeapDumpPath` and `-XX:ErrorFile` first in `JAVA_TOOL_OPTIONS`, so whether 
or not
+`JAVA_OPTIONS` is set, an out-of-memory heap dump (`heapdump_<host>_<launch 
time>/java_pid<pid>.hprof`) and a JVM crash log
+(`hs_err_pid<pid>_<host>_<launch time>.log`) land in `logs/`, where `<launch 
time>` is the local time as `YYYYMMDD-HHMMSS`. Each start gets its own 
`heapdump_*`
+directory, so the server and the JVMs it starts, such as computer jobs, write 
separate dumps (HotSpot names each dump and crash log after the JVM's PID, so a
+JVM that reuses an earlier PID from the same start cannot write its dump, and 
its crash log replaces the earlier one's). The host name keeps servers that 
share
+one log directory from picking the same name, and a counter (`<launch 
time>-1`, `-2`, ...) is added when the same host already used that second. If 
the
+directory cannot be created, for example on a full disk, the server still 
starts and dumps go to `logs/` itself, as a best effort: a full disk may have 
no room
+for the dump either. A heap dump can be as large as the heap. The launcher 
never deletes dumps or `heapdump_*` directories: each start leaves one, empty 
unless

Review Comment:
   Fixed in e930212: both the quickstart (EN + CN) and the Docker guide now say 
only starts that reach Java leave a `heapdump_*` directory. The server repo's 
`docker/README.md` got the same fix in apache/hugegraph#3258 (27b27cef).
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to