-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Amit,
On 9/8/16 12:49 AM, Amit Pande wrote: > Hello experts, > > We have configured the Tomcat to run as a Windows Service. And > Windows SCM has a default time of 30 seconds, but the Tomcat > process does not start/stop within this time. > > So, if we restart the service via SCM, we receive the Address in > Use exceptions (as previous Tomcat process hasn't been stopped > yet). > > We're using our own custom mechanism to hook the Tomcat process > with the Windows SCM and haven't gone the below mentioned way. > > https://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html > > Any pointers on how to solve this issue ? > > 1. Increasing Windows SCM timeout for this process might work but > doesn't sound really clean solution. It might be your only solution. > 2. Issue a Catalina stop, and if it does not stop in some time , > do a task kill or something similar of the corresponding java.exe > ? Windows has a few[1] kill[2] commands[3]. I don't know what the repercussions of killing your application are, though. Presumably, your application needs to clean up after itself. > Appreciate your help here. What's taking Tomcat (really your application) so long to shutdown? If there are requests taking a long time to complete, you can configure Tomcat to cancel those requests after a particular timeout[4]. I couldn't find a configuration setting for when using an <Executor>. Hmm... - -chris [1] http://www.howtogeek.com/145882/how-to-kill-a-process-from-the-cli-in-wi ndows/ [2] http://tweaks.com/windows/39559/kill-processes-from-command-prompt/ [3] https://technet.microsoft.com/en-us/library/bb491009.aspx [4] https://tomcat.apache.org/tomcat-8.0-doc/config/http.html, executorTerminationTimeoutMillis -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJX0YEEAAoJEBzwKT+lPKRYXMEP/R/pjvAIXyp8LsPhGyR1T1BZ 6HW4MSScWIvaVIwIxfCs73vL3KcIIzrEEN69PClVItLKMFOwtdUC5zW/w9emkWFb ppDhmFn5QOetldm3E/KiXp0gYpc9e5C/QKwjOsTwXKI3rA6kWsRMa6Tldve5cn81 9TV1F83iICj36n31jkYZJ6EPo9YQDrGvb9ezFhselZEXoSeTVF8q0T4P7fQkoX+q yqMEHyQQHR3RE6WOHkoz8NX06oSeEFdDrPISblvrqdxYEZD9AsToIR3uqalb29wo y72nOQPjpONnEcNBy2FpzXAvSPih6YFAlr/14v2W7Bfhdt+szutLkth3+3MDA9bK tWMXWf11tav4SUeXyb5vpaduSJ+iPXyQdW+UDakqQ2M77vuzbxVSRwXEjvswOhNh IhY5laFLHglEb/O9FfuNjXtMh0vVlyPJLGEAbsKAQnF5bQB7MckiVWBr7+thAHnM OCSnDoAwNqk+9hMs4CVPVWNT/kHWWzC6B7iawyoYdqjyln7zQp9YfKEUWudRzw+z JHQfeFOJsi7xXKHXuxFoNqJKuw5tx6o+Wjy/ElJpAlrOMhGzBPoTQobU/ukSQUUW X7rF1Sa0cg2UeOeaLe9TQ4yuCDgC02ExD2yxJ7Z2srFG88rCXyxJipwloXTWnyBq iuAEdD29FZ7n+hiQTfNL =ZnzF -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org