Difference between revisions of "Timeouts"
m |
m (Add Download timeout notes from v1.1.0 changelog https://wpkg.org/files/beta/Changelog-1.1.0-M4) |
||
| Line 4: | Line 4: | ||
=== Default setting of wpkg.js === | === Default setting of wpkg.js === | ||
| − | The server-side script wpkg.js has a | + | The server-side script wpkg.js has a built in default timeout of 3600 seconds = 60 minutes = 1 hour, it specifies the total time all installation processes are allowed to run. |
=== WPKG Client Settings === | === WPKG Client Settings === | ||
| Line 10: | Line 10: | ||
=== Package Timeout Attribute === | === Package Timeout Attribute === | ||
| − | Each '''install, upgrade and remove''' entry has an optional timeout attribute, which overrides the timeout for this entry only.<br> | + | Each '''install''', '''upgrade''' and '''remove''' entry has an optional timeout attribute, which overrides the timeout for this entry only.<br> |
<source lang="xml"> | <source lang="xml"> | ||
<!-- abort installation that usually takes three minutes after five minutes --> | <!-- abort installation that usually takes three minutes after five minutes --> | ||
<install timeout="300" cmd="..." /> | <install timeout="300" cmd="..." /> | ||
</source> | </source> | ||
| + | The '''download''' entry also has an optional timeout attribute, which defaults to the <code>downloadTimeout</code> as specified within [[config.xml]]. If omitted, this defaults to 7200. | ||
== Why use Timeouts == | == Why use Timeouts == | ||
Latest revision as of 18:04, 23 February 2018
This document in other languages: French
Contents
Timeouts
Default setting of wpkg.js
The server-side script wpkg.js has a built in default timeout of 3600 seconds = 60 minutes = 1 hour, it specifies the total time all installation processes are allowed to run.
WPKG Client Settings
The timeout settings in the WPKG client application override the total time all installation processes are allowed to run.
Package Timeout Attribute
Each install, upgrade and remove entry has an optional timeout attribute, which overrides the timeout for this entry only.
<!-- abort installation that usually takes three minutes after five minutes -->
<install timeout="300" cmd="..." />
The download entry also has an optional timeout attribute, which defaults to the downloadTimeout as specified within config.xml. If omitted, this defaults to 7200.
Why use Timeouts
You may have packages which take longer than others, so you have to adjust the overall timeout to successfully execute those installations.
On the other hand, you are installing those long lasting installations seldom, so you would like to break execution of the shorter installations earlier, if they hang.
Example
You have an installation, which takes one hour to execute, so you set the timeout to one and a half hour in the WPKG Client settings.
This makes sure, that the one hour installation will not get interrupted and that additional small installations can be performed too.
For the small installation packages you set a timeout attribute for those commands, which may hang, if there is a problem encountered.
This makes sure, that they do not hang the whole one and a half timeout period, but just the short time they usually need to execute successfully.