office-alexander-logistics/MEMORY.md

2 KiB

Wildfly HTTP Seesions

See articles:

Collect metrics

Use curl:

curl -s http://localhost:9990/metrics

wildfly_undertow_active_sessions{deployment="office-alexander-logistics.war",subdeployment="office-alexander-logistics.war",microprofile_scope="vendor"} 184.0

Check all active Sessions:

curl -s http://localhost:9990/metrics | grep -e "^wildfly_undertow_.*_sessions" 

Neue Memory Options:

        - name: JAVA_OPTS
          value: >
            -Xms5g
            -Xmx7g
            -XX:+UseG1GC
            -XX:MaxGCPauseMillis=200
            -XX:G1HeapRegionSize=16m
            -XX:InitiatingHeapOccupancyPercent=45
            -XX:+HeapDumpOnOutOfMemoryError
            -XX:HeapDumpPath=/tmp/heapdump
            -Dnashorn.args=--no-deprecation-warning            

Memory Analyse

curl -s http://localhost:9990/metrics | grep -e "^wildfly_undertow_.*_sessions" 
Zeit Mem Sessions
Mo 18:22 3947 31
Mo 18:34 3951 42
Mo 18:39 3955 48
Mo 18:39 3957 59
Mo 18:54 3983 62
Mo 18:54 4024 66
Mo 19:14 4040 66

Debug

Test Heap size:

$ curl -s http://localhost:9990/metrics | grep base_memory_usedHeap_bytes

HELP base_memory_usedHeap_bytes Displays the amount of used memory.

TYPE base_memory_usedHeap_bytes gauge

base_memory_usedHeap_bytes 1.605052856E9 base_memory_usedHeap_bytes 3.031116216E9 base_memory_usedHeap_bytes 1.910524016E9 base_memory_usedHeap_bytes 1.291952224E9