We have a project that is using post-refresh to update firmware/software on external USB connected devices, and they report the post-refresh hook is hitting a timeout. Is there a maxmum time a post-refresh hook can run before it is forcibly terminated? If so, how long? Can it be extended?
There is a time limit, and it is currently 10 minutes. It cannot currently be extended unless we change it globally in snapd for all post-refresh hooks everywhere.
Hooks are not meant to be run for such long amounts of time, have you explored using the
stop-command for a service to run this after a service is stopped for a refresh? You can adjust how long a command is given to run for the
stop-timeout in the snapcraft.yaml.
I have the same situation here, but, in the particular case, our hooks execution is dying out of 1m1s, not 10 minutes, that is the mark we keep seeing, could I use stop_timeout for running it up?
<exceeded maximum runtime of 1m1s>
Thanks Ian, I’ll let them know. We had discussed this approach previously.
snap version for you? and also can you share
snap changes and
snap tasks <chg> for the change where it times out like this?
I need to replicate again the error, I will collect the data and post here