Skip to content

Conversation

@bharathappali
Copy link
Collaborator

As we use -force option it expects CATALINA_PID , Initially kill fails as CATALINA_PID is not set but the script shuts down tomcat gracefully. Increased shutdown timer to 15 secs to give a buffer to shutdown.

Signed-off-by: bharathappali [email protected]

@bharathappali bharathappali changed the title Reverted back to use shutdown.sh for shutting down tomcat gracefully WIP: Reverted back to use shutdown.sh for shutting down tomcat gracefully Jan 28, 2021
@bharathappali
Copy link
Collaborator Author

Marked as WIP as some checks are failing, I Will fix them and remove the WIP tag

@bharathappali bharathappali marked this pull request as draft January 28, 2021 10:39
@bharathappali bharathappali marked this pull request as ready for review January 28, 2021 12:53
@bharathappali bharathappali changed the title WIP: Reverted back to use shutdown.sh for shutting down tomcat gracefully Reverted back to use shutdown.sh for shutting down tomcat gracefully Jan 28, 2021
@dinogun
Copy link
Collaborator

dinogun commented Jan 28, 2021

@bharathappali Can you please add some comments here on why these changes are needed so that it is clear to everyone

@bharathappali
Copy link
Collaborator Author

Earlier we have generated SCC by running tomcat 3 times to cache as many base classes as it uses every time it starts and we used kill command to kill the tomcat process directly as shutdown.sh is failing to shutdown tomcat in the given timeframe (5 seconds - if increased we get longer build times)

Later we came to know that use of kill is not a good practice to stop tomcat but we should be using shutdown.sh script to shut it down gracefully. As shutdown.sh takes longer time to stop tomcat and also successive runs were not making tomcat to come up instantly we are now restricting the SCC creation for only one run. The number of classes added to SCC in the successive runs are very negligible. So giving a longer sleep time for tomcat to shutdown for one run will not be effecting the build time as well so these following changes were been made.

  • Tomcat runs for SCC generation are reduced from 3 to 1
  • Turning of tomcat is now taken care by shutdown.sh
  • Removed kill command to stop tomcat as its replaced by shutdown script
  • ps package installation was removed as we no longer need it

Copy link
Collaborator

@dinogun dinogun left a comment

Choose a reason for hiding this comment

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

lgtm

@dinogun dinogun merged commit f6a6dce into AdoptOpenJDK:master Jan 28, 2021
@karianna karianna added this to the January 2021 milestone Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants