[jira] [Commented] (DAEMON-384) prunsrv stopping with error due to hardcoded timeout
[ https://issues.apache.org/jira/browse/DAEMON-384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16426856#comment-16426856 ] blassmegod commented on DAEMON-384: --- [~garydgregory]: PR created: [https://github.com/apache/commons-daemon/pull/5] Thank you, > prunsrv stopping with error due to hardcoded timeout > > > Key: DAEMON-384 > URL: https://issues.apache.org/jira/browse/DAEMON-384 > Project: Commons Daemon > Issue Type: Bug > Components: Procrun >Affects Versions: 1.1.0 > Environment: Windows 7 (x64) >Reporter: blassmegod >Priority: Major > Labels: easyfix, windows > Fix For: 1.1.1 > > Original Estimate: 24h > Remaining Estimate: 24h > > Due to the fact that in the function *service_ctrl_handler,* from > http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/apps/prunsrv/prunsrv.c, > the timeout for the case SERVICE_STOP_TIMEOUT is hardcoded to 3 seconds ( 3 > * 1000 ms), which in the case of servers with big and multiple deployed > application, the actual stopping time of the server might take for sure > longer that 3 seconds, and in this case the Windows service will crash with > an exception, because it's unable to wait enough so that the server is > stopped. > The resolution is rather simple, just use SO_STOPTIMEOUT * 1000 if > SO_STOPTIMEOUT > 0. This way the user that creates the service with > procrun/prunsrv can configure the timeout with --StopTimeout=xxx seconds. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (DAEMON-384) prunsrv stopping with error due to hardcoded timeout
[ https://issues.apache.org/jira/browse/DAEMON-384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424456#comment-16424456 ] Gary Gregory commented on DAEMON-384: - [~blassmegod]: Thank you for your report. Please feel free to provide a PR on GitHub: [https://github.com/apache/commons-daemon] Gary > prunsrv stopping with error due to hardcoded timeout > > > Key: DAEMON-384 > URL: https://issues.apache.org/jira/browse/DAEMON-384 > Project: Commons Daemon > Issue Type: Bug > Components: Procrun >Affects Versions: 1.1.0 > Environment: Windows 7 (x64) >Reporter: blassmegod >Priority: Major > Labels: easyfix, windows > Fix For: 1.1.1 > > Original Estimate: 24h > Remaining Estimate: 24h > > Due to the fact that in the function *service_ctrl_handler,* from > http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/apps/prunsrv/prunsrv.c, > the timeout for the case SERVICE_STOP_TIMEOUT is hardcoded to 3 seconds ( 3 > * 1000 ms), which in the case of servers with big and multiple deployed > application, the actual stopping time of the server might take for sure > longer that 3 seconds, and in this case the Windows service will crash with > an exception, because it's unable to wait enough so that the server is > stopped. > The resolution is rather simple, just use SO_STOPTIMEOUT * 1000 if > SO_STOPTIMEOUT > 0. This way the user that creates the service with > procrun/prunsrv can configure the timeout with --StopTimeout=xxx seconds. -- This message was sent by Atlassian JIRA (v7.6.3#76005)