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


##########
content/en/docs/guides/hugegraph-docker-cluster.md:
##########
@@ -293,7 +293,20 @@ 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; their INFO output and the audit and slow-query logs stay in
+files. The full `hugegraph-server.log`, JVM crash logs (`hs_err_pid*.log`) and 
out-of-memory heap dumps (`java_pid*.hprof`) are in `/hugegraph-server/logs`.
+`docker restart` keeps them, but Kubernetes starts a new container on every 
restart, so mount an `emptyDir` or a PersistentVolumeClaim at
+`/hugegraph-server/logs` to keep them. A heap dump can be as large as the JVM 
heap, and every launch writes to a new file, so a Server that keeps running out 
of
+memory adds one heap-sized dump per restart until the volume is full. The 
launcher never removes old dumps, whether the volume is an `emptyDir` (which 
also
+survives container restarts) or a PVC. Size the volume for the number of dumps 
you want to keep plus the logs, move or delete old `java_pid*.hprof` files after
+each incident, or turn dumps off with `-XX:-HeapDumpOnOutOfMemoryError`.

Review Comment:
   Minor: This page is about containers, but it does not say where to put 
`-XX:-HeapDumpOnOutOfMemoryError`. The `-j` route from the quick start page is 
not reachable here: `docker-entrypoint.sh` runs `./bin/start-hugegraph.sh -j 
"${JAVA_OPTS:-}"`, so the flag has to go in the `JAVA_OPTS` env var. The paired 
`docker/README.md` text in apache/hugegraph#3258 says exactly that ("pass 
`-XX:-HeapDumpOnOutOfMemoryError` in `JAVA_OPTS`"). Please add "in `JAVA_OPTS`" 
here and in the CN page (line 301). It may also help to note that setting 
`JAVA_OPTS` replaces the image default (`-XX:+UseContainerSupport 
-XX:MaxRAMPercentage=50 ...`), or that `JAVA_TOOL_OPTIONS` works too and keeps 
those defaults, since the launcher appends the operator's `JAVA_TOOL_OPTIONS` 
after its own.



-- 
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