# Unable to analyze large heap dump

Sometimes you might run into problems while analyzing large size heap dump files. Here are few pointers to fix them:

# 1. -Xmx should be 2x heap dump file size

If your heap dump file size is 10GB, make sure to allocate 20GB as yCrash's heap size. Basically, you need to allocate 2x the size heap dump file.

If you are running yCrash Server in Linux then edit launch-yc-server.sh, if you are running yCrash Server in Windows, then edit launch-yc-server.bat. In the appropriate launch script specify the '-Xmx20g'.

Example:

... -Xmx20g ...
1

# 2. Increase timeout setting

If the yCrash server is deployed behind a load balancer or reverse proxy (such as Apache, NGINX, F5, etc.), be aware that these components typically have default timeout values (often around 5–10 minutes).

These default timeouts may not be sufficient for uploading and processing large heap dump files, which can take significantly longer depending on file size and network conditions.

To avoid request interruptions or failures, it is recommended to increase the timeout settings to a higher value (for example, up to 2 hours) across all relevant layers, including:

  • Load balancer (e.g., AWS ALB/NLB, F5)
  • Reverse proxy (e.g., NGINX, Apache)
  • Ingress controller (if applicable)

Ensure that all timeout configurations are aligned to support long-running uploads and analysis operations.

Example:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: yc-server-nginx-ingress
  namespace: yc-apps
  annotations:
    # --- Large upload support (heap dumps, etc.) ---
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
    nginx.ingress.kubernetes.io/proxy-request-buffering: "off"

    # --- Long-running request support ---
    nginx.ingress.kubernetes.io/proxy-read-timeout: "7200"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "7200"
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "60"

    # --- Disable buffering for streaming uploads ---
    nginx.ingress.kubernetes.io/proxy-buffering: "off"

    # --- Sticky session (important for multi-pod yc-server) ---
    nginx.ingress.kubernetes.io/affinity: "cookie"
    nginx.ingress.kubernetes.io/session-cookie-name: "SOURCEHASH"
    nginx.ingress.kubernetes.io/session-cookie-hash: "sha1"

    # --- Optional but useful ---
    nginx.ingress.kubernetes.io/client-body-timeout: "3600"
    nginx.ingress.kubernetes.io/session-cookie-path: "/"
    nginx.ingress.kubernetes.io/session-cookie-max-age: "86400"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

# 3. Alternative to Large Heap Dump Analysis: Heap Substitute

When dealing with large heap dumps, configuring adequate heap memory (-Xmx) for the yCrash tool can pose a significant challenge, particularly when system resources are limited. For users facing memory constraints, we offer a lightweight alternative: Heap Substitute.

Heap Substitute provides a concise, high-level summary of your application's heap, showcasing object types, their counts, and the memory they occupy—without requiring the extensive memory allocations typically needed for full heap dumps. While it doesn't offer the same granular details as a heap dump, Heap Substitute serves as an effective tool for quickly assessing heap data or when memory limitations prevent a full heap dump analysis.

To learn more about how to use Heap Substitute, its benefits, and how to capture it, please refer to the full documentation here.

# 4. Discard Options

Efficiently analyze large heap dumps by discarding non-essential objects during parsing. This feature helps reduce memory usage and prevents crashes when dealing with extremely large dumps by allowing percentage-based or class-based object filtering.

To learn more about how to use Discard Options, please refer to the full documentation here

# 5. Reach to customer support

If you still continue to have problem, send your logs/yc.log file that is present in the directory where you have installed ‘ycrash’ to team@tier1app.com