Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script check timeout behavior #1508

Closed
shmizad opened this issue Dec 16, 2015 · 2 comments
Closed

Script check timeout behavior #1508

shmizad opened this issue Dec 16, 2015 · 2 comments
Labels
type/enhancement Proposed improvement or new feature

Comments

@shmizad
Copy link

shmizad commented Dec 16, 2015

Do script checks have a timeout of 30 seconds? As soon as a script takes more than 30s to run, it's marked as critical and no output is printed whatsoever.

Also I can't find any log entries that say that the script timed out.

Unfortunately I couldn't find any documentation that mentions this timeout. It would be nice to be able to set the timeout in the config file manually if a longer timeout is necessary and to have a meaningful error message.

The first script will run as expected, the other one will result in the check being marked 'critical' and the output string is empty:

#!/bin/sh

sleep 29
echo "you can read this"
#!/bin/sh

sleep 31
echo "you cannot read this"

This issue happened in 0.5.2 and 0.6.0. I didn't test it on other versions.

@slackpad slackpad added the type/enhancement Proposed improvement or new feature label Dec 16, 2015
@slackpad
Copy link
Contributor

Hi @shmizad - thanks for opening an issue! There is a 30 second limit enforced here - https://github.com/hashicorp/consul/blob/master/command/agent/check.go#L175. We'd need to look through the surrounding code to make sure it's ok to tune this with a config, but we can definitely document this and provide a good error message (it gets emitted through a channel but not logged for the timeout case).

@slackpad
Copy link
Contributor

slackpad commented May 5, 2017

Closed via #1762.

@slackpad slackpad closed this as completed May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Proposed improvement or new feature
Projects
None yet
Development

No branches or pull requests

2 participants