brianreumere / gandi-automatic-dns

Dynamic DNS shell script for Gandi
Other
100 stars 22 forks source link

openssl s_client sometimes hangs, would be nice to have some timeout #31

Closed agroszer closed 1 year ago

agroszer commented 2 years ago

Caught openssl s_client eating the CPU for days... would be nice to have some timeout

brianreumere commented 2 years ago

I looked into this briefly and it doesn't seem like there's any easy, portable way to do it (most guidance suggests the timeout command from coreutils, which isn't available or installed by default on a lot of OSes). Something like this StackOverflow answer looks like it might be portable enough, but is a lot more complex.

I'm going to hold off on adding anything right now (I don't really have the time to dedicate to figuring out a proper, portable solution), but I'll leave this issue open.

Alexandero89 commented 2 years ago

Can confirm. Was hanging for some days. Fixed it by prepending the timeout command in the crontab.

timeout --signal=9 60 /path/to/scirpt [options]

brianreumere commented 1 year ago

I added a note in the installation section of the README about using the timeout command. Thanks for reporting!