Client hangs


#1

Hi,

I’m running a simple script that creates a new client, gets the temperature/pressure, prints them out, and exists (with a client.close() call).

This script is run every minute.

After a few hours, the script hangs (I’m unsure where, not done much debugging yet) and hence numbers stop being reported.

My actual question is: has anyone seen this behaviour before?

U


#2

Can you post the code you are using? Also, how are you making the periodic call, via a cron job?


#3

The script can be found here https://gist.github.com/ulises/0d687bde76d1c6f60f07f620ecd1fe40

This script is run by collectd. Ignore the stuff in {{ }} as that’s some templating stuff that gets filled in when this script is deployed (yes, I am making things /as/ convoluted ^.^)


#4

For now I’ve resorted to running my script with timeout (http://linux.die.net/man/1/timeout) until I figure out why it’s hanging.