-
Notifications
You must be signed in to change notification settings - Fork 22
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
JAVA_TOOL_OPTIONS can't be picked up when the params length > 1024 in JAVA8 #177
Comments
Besides upgrading to Java 11+, it doesn't seem like it. The SO post you linked to indicates that it is a hard-coded limit in Java. Let me double-check with our OpenJDK vendor though and see if they have any suggestions. |
Thanks @dmikusa-pivotal, any update about this? |
Yes, I talked to our JVM vendor and they said there's no way around the limit. It's hard coded. We talked about a couple of options here. Minimally, making the process error out when you exceed the 1024 limit, that way things don't silently fail. Depending on how the OpenJDK community feels, they might also be able to backport support to remove the size restriction. That's more work though and it's Java 8, so it ultimately depends on what the community is willing to accept. I don't think there will be a quick turnaround on this. In the meantime, the best we could do would be to add a helper which checks the size of |
thank you @dmikusa-pivotal, I don't think failing the application directly is a good choice, can we log the size error and provide an env to decide whether fail the application or not? I think it's more flexible for us |
@dmikusa along with the increasing length of our internal JVM parameters, 1024 is not enough for our customers' JAVA 8 applications. |
No, sorry, that would break buildpack functionality. We can't do that. |
If customer have own jvm parameters, which one will be used. The buildpack jvm parameters or customers? |
Both. If a user sets If a user sets the property |
What happened?
The java_opts helper will adding $JAVA_OPTS to $JAVA_TOOL_OPTIONS", see java_opts.go
When using java8, if configured
JAVA_OPTS
params length is too long(>1024), then theJAVA_TOOL_OPTIONS
can't be loaded into the process.I saw some issues about this, is there any way to workaround?
for JAVA 11, the
JAVA_TOOL_OPTIONS
works wellWhat were you attempting to do?
Using JAVA8 and config
JAVA_OPTS
with multiple parameters.What did you expect to happen?
The configured
JAVA_OPTS
can be loaded into the main processWhat was the actual behavior? Please provide log output, if possible.
If the length is too long(> 1024), the
JAVA_OPTS
will be ignored andJAVA_TOOL_OPTIONS
can't be picked up.Build Configuration
What platform (
pack
,kpack
,tekton
buildpacks plugin, etc.) are youusing? Please include a version.
kpack 0.5.2
What buildpacks are you using? Please include versions.
libjvm 1.36.1
What builder are you using? If custom, can you provide the output from
pack inspect-builder <builder>
?Can you provide a sample app or relevant configuration (
buildpack.yml
,nginx.conf
, etc.)?Checklist
The text was updated successfully, but these errors were encountered: