-
Notifications
You must be signed in to change notification settings - Fork 148
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
7.0.6 takes longer to deploy (delaying start up and triggering a 60 seconds timeout) #24484
Comments
To extend the start timeout, try the following env (default 60_000L): |
Set low so I can see it is controlling the time:
Yes it works, now to extend and test 7.0.6 7.0.5:
7.0.6 with AS_START_TIMEOUT=600000
The timeout extension prevents the return value making the OS think it failed. 7.0.6 takes twice the time of 7.0.5. Otherwise identical. ears, wars, data, etc. |
Now with the timeout fixed I can progressively undeploy and prune to find a cause. I find that that including the Square payment dependencies makes a difference. In pom.xml:
This increases the size of my WAR from 400k to 10MB and increases the deploy time . On GF 7.0.5 it increases from 2 to 5 seconds, on GF 7.0.6 this increases from 2 seconds to 30. So although Square adds a lot of dependency files (probably needlessly, I guess a lot are never used) 7.0.6 is taking 6 times longer to process. Note I have removed all the Square code so to reproduce just add the dependency. I try another project and just add the dependency, Deploy times adding dependency. 6 times longer with 7.0.6:
|
I have a small script to print the stack trace of the thread that's running the deploy command. I use it when I want to know what's happening during deployment when the deployment is slow. Maybe it will help you investigate what's happening:
if you run it regularly during deployment, you'll see what is taking so long. I suspect it's CDI scanning (Weld), since the JAR file probably has a lot of classes to scan for bean-defining annotations. |
Thank you for the suggestion. I have run the above command during deployment. In the phase it appears to take the time this is the output:
So yes, CDI and Weld is there. |
Change for 7.0.6: |
Just for the record, without any deployment on my machine (Xeon, 64GB RAM):
It seems the issue is really in deployment. |
Deployment is a part of useful startup which was tripping a timeout causing failure, but yes, we have narrowed it to deployment and I have amended the title accordingly. |
You could try to downgrade Weld to 5.1.0 by copying https://mvnrepository.com/artifact/org.jboss.weld/weld-osgi-bundle/5.1.0.Final to [glassfish root]/glassfish/modules/weld-osgi-bundle.jar and see if that makes a difference. I haven't tried this, but I believe the downgrade should be possible. |
@oxdrove any update? |
I swapped the weld jars from 5 and 6, no change. I have tried to build from source with a view to using Weld 5.1.0 not 5.1.1. I have read README.md specifically "## Building". I run "mvn clean install" and it complains:
How to build? |
Thanks for testing that. In the latest commit I just updated Weld to 5.1.1.SP1. You could try that one too:
That looks like a Maven environment not correctly configured. Specifically the |
What maven version and java do you use? |
From README.md:
mvn works for other projects, There appears to be something odd about maven on the build machine, I am investigating |
Maven: My fault. The build server has to have an environment that uses the freshly built software before the installed packages, that is how a new package links to a library before the library is installed, if it were installed the removal of the old version would stop installed packages working. mvn is working, the build now report failure, I will investigate before reporting here. |
7.0.7 is as slow as 7.0.6. Building gives errors,
...no, I'm trying to build it not commit it.
no, I just want to build it from source. |
It would help if it was clearer on what "your" pom.xml file is.
Plenty from which to choose and none mentions dotGitDirectory.
|
Maven tries to resolve the git commit id which is used in GlassFish internally. |
...and fails. I either fudge it, get a git commit id or give up. I only know how to do the later. |
|
Sorry I need to go and do something useful. Stepping back from build, the problem points to Weld, isn't Weld a dependent project? So the change is is Weld not Glassfish and we should be looking at Weld and not Glassfish? |
No, it's not related to Weld. It's used by the GlassFish distribution artifact to retrieve the git commit ID and add it to the GlassFish ZIP. You can fix this message and skip running the git plugin with this:
Unfortunately, it's not possible to configure this via a system property on the command line, you need to modify the file. |
I already tried the failOnNoGitDirectory but had another error and have been working on it.
It is trying to make this file with a macro so it will not exist until it makes it itself. It does not complain it can not make the file. The line above, in the pom.xml, that makes xmlsec.jar does work. I can not see why. |
Summery of progress:
Longer version: I compiled 7.0.6 with "Integrate Weld 5.1.1 #24480" in reverse. Same slow load. Some change between 7.0.5 and 7.0.6 has caused this. The logical this to do is compile 7.0.5 and incrementally add the changes that created 7.0.6. Sadly 7.0.5 compiled does not run as 7.0.5 binary version [for me]. It just hangs on start. I can take 7.0.5 and 7.0.6 and diff the two to play spot-the-difference but this is taking me too long. The sensible thing to do it for someone that actually understands the build and the changes that took place to test this. |
Actually it usually doesn't hang, but the initialization failed for some reason, so it cannot log anything. The first log is logged by the start-domain command, not by the server, that confused me years ago too. To see what happened you can try to execute
I did not find any usage of this module in GlassFish. Can you send us the stacktrace? |
It's not. Expanding my "Glassfish requires" Glassfissh requires this option in order to pass to Java so it can run my applications. Glassfish being a means to and end and for non Glassfish developers not an end itself - I don't require Glassfish at all. Note too it's not java as such that needs it, java 17 runs my library methods perfectly well from the command line leading to my confusion as to what the opaque error message meant. |
This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment |
I can't see what we could improve with this now until we receive the (worst+best results) 7.0.6 7.0.18 7.0.19-SNAPSHOT with #25183 |
Your results are meaningless unless you indicate the presence of the square dependency. You need to perform 4 tests: with w/o square times 7.0.5 or 7.0.6. During investigation the question has narrowed from "7.0.6 takes longer to deploy" to the more specific "Why does 7.0.6 take longer to load Square than 7.0.5". |
Environment Details
Problem Description
Start takes significantly longer with 7.0.6 than 7.0.5
This would not be a problem, although a minor inconvenience, were is not for the 60 seconds timeout for start which is exceeded.
Glassfish 7.0.6
Glassfish 7.0.5
Steps to reproduce
Update to 7.0.6
Impact of Issue
Slow start triggers a 60 second limit which flags the start up as failed. Glassfish actually starts but it says it doesn't, return value from asadmin I presume. This causes the SMF status to go to maintenance.
Solution is working out why 7.0.6 takes twice as long to start however it also should be possible to extend the start time out - maybe it is, I can't see how.
The text was updated successfully, but these errors were encountered: