galaxyproject / tools-iuc

Tool Shed repositories maintained by the Intergalactic Utilities Commission
https://galaxyproject.org/iuc
MIT License
161 stars 417 forks source link

goenrichment ignores JAVA_OPTS and JAVA_TOOL_OPTIONS #6135

Open martindemko opened 4 weeks ago

martindemko commented 4 weeks ago

Hi, I'm usegalaxy.cz admin and recently discovered that this tool totally ignores CPU and RAM setup in TPV. No surprise, it's a Java tool, so I tried to set JAVA_OPTS, then JAVA_TOOL_OPTIONS, but none of these worked. The only thing that works is _JAVA_OPTIONS, which is not the best way to achieve this; moreover, when the Python wrapper for the tool supports setting up these stuff as part of the command. I could have misunderstood something, of course. But if I'm right, the correction could be very simple. Just add the -Xmx\${GALAXY_MEMORY_MB}m to the command. Thanks.

Best, Martin

bgruening commented 4 weeks ago

Hi @martindemko!

Why do you think setting _JAVA_OPTIONS is not good? https://github.com/galaxyproject/tpv-shared-database/blob/main/tools.yml#L364

Its the Java way of doing things, not ideal but ... :)

martindemko commented 4 weeks ago

Cau Bjorn, Well, I was told that using it is not a good practice because it is not documented and was superseded by JAVA_TOOL_OPTIONS. Also, it could be used inside of the Java code to overwrite some settings (highest precedence over other env vars), and using it outside of the code could lead to unpredictable behavior. If I understood it correctly.