Skip to content

Commit 86e5c87

Browse files
committed
Bug #10769
Add a new CLI script, deployment-timeout.cli, to set the timout of the application deployment of Wildfly. The timeout value is expressed in seconds and it is defined by the new configuration property SERVER_STARTING_TIMEOUT in the config.properties configuration file. If Silverpeas starting is too long, with the default timeout of 5mn, the Silverpeas deployment can then fail for timeout error. By setting this property with a greater value, Silverpeas can take the time it needs to initialize all of its resources. Aside that, in order to avoid the start/debug task of the installer to fail when Silverpeas takes a long time to start, the configuration property SERVER_STARTING_TIMEOUT is also used as timeout for JBoss to respond to the tasks.
1 parent 253e52e commit 86e5c87

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
<properties>
8383
<!-- property used by the CI to both deploy a build version and release the next stable version -->
8484
<next.release>6.1</next.release>
85-
<server.distribution>wildfly15</server.distribution>
85+
<server.distribution>wildfly17</server.distribution>
8686
</properties>
8787

8888
<build>

src/main/dist/bin/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ silversetup {
6767

6868
bundles {
6969
// used to construct the Silverpeas application from a descriptor of software components that
70-
// made up Silverpeas
70+
// made up Silverpeas. See silverpeas.gradle for software configuration.
7171
silverpeas = project.configurations.silverpeas
7272
tiers = project.configurations.library
7373
}
@@ -148,8 +148,9 @@ task start {
148148
description 'Starts Silverpeas'
149149
group 'Silverpeas'
150150
doLast {
151+
long timeout = (project.silversetup.settings.SERVER_STARTING_TIMEOUT as Long) * 1000
151152
new JBossServer(project.silversetup.jbossHome.path)
152-
.withStartingTimeout(project.silversetup.timeout.get())
153+
.withStartingTimeout(timeout)
153154
.redirectOutputTo(project.ext.jbossOutputLog)
154155
.start()
155156
}
@@ -163,8 +164,9 @@ task debug {
163164
group 'Silverpeas'
164165
doLast {
165166
int port = (project.ext.has('port') ? project.ext.port as int:5005)
167+
long timeout = (project.silversetup.settings.SERVER_STARTING_TIMEOUT as Long) * 1000
166168
new JBossServer(project.silversetup.jbossHome.path)
167-
.withStartingTimeout(project.silversetup.timeout.get())
169+
.withStartingTimeout(timeout)
168170
.redirectOutputTo(project.ext.jbossOutputLog)
169171
.debug(port)
170172
}
@@ -211,8 +213,9 @@ task reload {
211213
group 'Silverpeas Development'
212214
onlyIf { silversetup.installation.developmentMode }
213215
FileLogger log = FileLogger.getLogger('reload')
216+
long timeout = (project.silversetup.settings.SERVER_STARTING_TIMEOUT as Long) * 1000
214217
JBossServer jboss = new JBossServer(project.silversetup.jbossHome.path)
215-
.withStartingTimeout(project.silversetup.timeout.get())
218+
.withStartingTimeout(timeout)
216219
.redirectOutputTo(project.ext.jbossOutputLog)
217220
.useLogger(log)
218221
doFirst {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/system-property=jboss.as.management.blocking.timeout:add(value=${SERVER_STARTING_TIMEOUT})
2+
/subsystem=deployment-scanner/scanner=default:write-attribute(name=deployment-timeout,value=${SERVER_STARTING_TIMEOUT})

src/main/dist/configuration/sample_config.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@
8181
# false. By default false.
8282
#SERVER_SECURED=false
8383

84+
# The timeout in seconds for the server to start Silverpeas. By default, the timeout of the
85+
# application deployment of the server (5mn in Wildfly). When Silverpeas is started by the server
86+
# (when it is deployed in the JEE jargon), it can take some times to initialize the resources that
87+
# depends on the amount of the data managed by Silverpeas and on the performance of both the
88+
# hardware and the filesystem. If you encounter a timeout error at Silverpeas starting, then
89+
# change the value here (for example, by setting it to 900 for 15mn)
90+
#SERVER_STARTING_TIMEOUT = 300
91+
8492
####################################################################################################
8593
## Properties of the database to use for Silverpeas.
8694
####################################################################################################

0 commit comments

Comments
 (0)