Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building an ig is giving me a heap space error. #5

Closed
Healthedata1 opened this issue Aug 17, 2023 · 6 comments
Closed

building an ig is giving me a heap space error. #5

Healthedata1 opened this issue Aug 17, 2023 · 6 comments

Comments

@Healthedata1
Copy link

Building an ig is giving me a heap space error. In my local build I allocate 4G:

java -Xmx4G -jar ${path} -ig ig.ini -tx $NA

Can you add a parameter to adjust the to increase the heap maximum size or hardcode it. I am not sure if you need paid accounts or not to do this.

From Github

Supported runners and hardware resources
Note: GitHub also offers larger runners, which are available in larger configurations, with autoscaling enabled by default and optional dedicated IP addresses. For more information, see "About larger runners."

Hardware specification for Windows and Linux virtual machines:
2-core CPU (x86_64)
7 GB of RAM
14 GB of SSD space

Hardware specification for macOS virtual machines:
3-core CPU (x86_64)
14 GB of RAM
14 GB of SSD space

Hardware specification for macOS XL virtual machines:
12-core CPU (x86_64)
30 GB of RAM
14 GB of SSD space

@qligier
Copy link
Owner

qligier commented Aug 17, 2023

Hi @Healthedata1! I guess this is one example of the failure: https://github.com/Healthedata1/R5ElementExtensionTest/actions/runs/5885731783/job/15962594524?

I have created a branch with some modifications:

  • The JDK is now Zulu, which is said to be a bit more stable for memory usage.
  • There is a step that shows the default configuration of Java.
  • There is an input java-flags that you can use to configure Java.

You can use it with:

- uses: qligier/fhir-ig-action@feature_memory_debug
  with:
    java-flags: "-Xmx4G"

-Xmx4G seems the first solution to try, there are other flags that may be useful too.
Otherwise, the IG Publisher should be optimized (e.g. it seems to use a StringBuilder to create file contents, a FileOutputStream would greatly lower the memory usage of this task).

Can you try if you can build your IG with these modifications?

@Healthedata1
Copy link
Author

Healthedata1 commented Aug 17, 2023 via email

@Healthedata1
Copy link
Author

That worked and thank you!

FYI this is my workflow file:

# This is a basic workflow to build a FHIR-IG and publish the output (docs folder) 
# on Git Hub Pages everytime it is pushed to the main branch

name: Build and Deploy

# Controls when the workflow will run
on:
  # Triggers the workflow on push or pull request events but only for the "main" branch
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

permissions:
  contents: write
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout 🛎️
        uses: actions/checkout@v3
      - name: FHIR IG Action   # action from the GitHub Marketplace
        # uses: Healthedata1/fhir-ig-action@v0.3.0-alpha
        uses: qligier/fhir-ig-action@feature_memory_debug
        with:
          java-flags: "-Xmx4G"
          sushi: "3.2.0"
      - name: Deploy to GitHub Pages  # action from the GitHub Marketplace
        uses: JamesIves/github-pages-deploy-action@v4.4.3
        with:
          folder: docs # deploy from the docs from the prior step

@qligier
Copy link
Owner

qligier commented Aug 18, 2023

Thank you for testing! I'll then apply the "zulu" and "-Xmx4G" modifications to the action.

@qligier qligier closed this as completed Aug 18, 2023
qligier added a commit that referenced this issue Aug 19, 2023
@qligier
Copy link
Owner

qligier commented Aug 19, 2023

I've released v0.3.0 with these changes.

@Healthedata1
Copy link
Author

Healthedata1 commented Aug 19, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants