Timeouts

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

This document in other languages: French

Timeouts[edit]

Default setting of wpkg.js[edit]

The server-side script wpkg.js has a build 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[edit]

The timeout settings in the WPKG client application override the total time all installation processes are allowed to run.

Package Timeout Attribute[edit]

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="..." />

Why use Timeouts[edit]

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[edit]

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.