[wpkg-users] Global max execution time hardcoded?

Rainer Meier r.meier at wpkg.org
Wed Mar 20 20:43:33 CET 2013


Hi Marco,


On 20.03.2013 19:06, Marco Gaiarin wrote:
>
> In my setup, switching to 7/WPKG-GP, i need to impose a rather
> draconian ''max execution time'' (man 15 minutes) to wpkg run.
>
> After looking in docs and in the code, seems to me that the 'one hour'
> limit is hardcoded, but there's two places, eg:

As you already found out all executions of external applications are done via 
the exec() function. If you like to change the timeout then feel free to adjust 
it, it's open source. I currently don't see a reason to configure it globally as 
you can also set individual execution times on individual commands and nothing 
else you will change if you change the exec() function.


There is no GLOBAL execution timeout for a complete WPKG run (it can basically 
run for hourws). But only a global timeout for individual commands which by 
default is set to 1h unless timeout is specified for an individual command.

The purpose of 1h timeout per command is only to assure that WPKG will not wait 
forever on commands which block (e.g. cmd scripts which have a "pause" in it or 
simply installers which won't proceed without user input). So it's set 
reasonably high so even large programs will usually finish within the timeout.
If you know that a specific command is taking much less time you can also lower 
the timeout but it will have an impact only if this command will exceed the 
timeout. WPKG of course does not wait until timeout expires if the command 
terminates earlier.

Please note that lowering the timeout for an individual account still does not 
allow you to make any easy estimate on the total WPKG run time. Run time depends 
on number of commands in your packages. Package installation will actually be 
marked as failed if timeout occurs. So I personally really don't see a reason to 
lower the timeout unless you're keen on seeing more errors during deployment. 
Perhaps it makes sense to lower the timeout for specific commands but this is 
what the timeout attribute is for.

br,
Rainer



More information about the wpkg-users mailing list