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

Add more memory for docker container [ci skip] #6105

Merged
merged 5 commits into from
Oct 3, 2024

Conversation

jpfleischer
Copy link
Contributor

Summary

This PR adds Docker memory command line parameters to ensure that it does not error out due to lack of memory.

@jpfleischer jpfleischer requested a review from a team as a code owner September 30, 2024 17:46
@leonardehrenfried leonardehrenfried changed the title Add more memory for docker container Add more memory for docker container [ci skip] Sep 30, 2024
docker run --rm -v "$(pwd)/berlin:/var/opentripplanner" docker.io/opentripplanner/opentripplanner:latest --build --save
docker run --rm \
--memory=8g \
-e JAVA_OPTS='-Xmx8g' \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's common but a few paragraphs down we say that we want to use JAVA_TOOL_OPTIONS. I might remove support for JAVA_OPTS in the future.

@@ -20,9 +20,16 @@ curl -L https://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf -o be
# download GTFS
curl -L https://vbb.de/vbbgtfs -o berlin/vbb-gtfs.zip
# build graph and save it onto the host system via the volume
docker run --rm -v "$(pwd)/berlin:/var/opentripplanner" docker.io/opentripplanner/opentripplanner:latest --build --save
docker run --rm \
--memory=8g \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--memory=8g \

This actually limits the memory rather than increasing it.

# load and serve graph
docker run -it --rm -p 8080:8080 -v "$(pwd)/berlin:/var/opentripplanner" docker.io/opentripplanner/opentripplanner:latest --load --serve
docker run -it --rm -p 8080:8080 \
--memory=8g \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.84%. Comparing base (b174c25) to head (173a827).
Report is 1 commits behind head on dev-2.x.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6105      +/-   ##
=============================================
- Coverage      69.84%   69.84%   -0.01%     
  Complexity     17463    17463              
=============================================
  Files           1974     1974              
  Lines          74606    74606              
  Branches        7640     7640              
=============================================
- Hits           52109    52108       -1     
  Misses         19850    19850              
- Partials        2647     2648       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jpfleischer
Copy link
Contributor Author

this is fixed. I highly recommend keeping my change as new users will inevitably error out with not enough heap space

@leonardehrenfried leonardehrenfried merged commit 178ebec into opentripplanner:dev-2.x Oct 3, 2024
@leonardehrenfried
Copy link
Member

Thanks for the PR!

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

Successfully merging this pull request may close these issues.

2 participants