Hi,
I'm going to summarise the findings:
When running a simple test app (uWSGI+Bottle+Kazoo) with Upstart, the environment variable LANG doesn't get set by default and this causes problems for Kazoo in this setup. What the app does is initialise the logging system on DEBUG, create a zookeeper client and set a DataWatch to monitor a key; afterwards it just replies to http requests on "/ping" to test if it's still alive.
I've managed to narrow down the problem to the following conditions:
if:
- app started by Upstart (LANG is not set in the environment)
- app runs in uWSGI
- use a DataWatch with a callback
- the code: http://pastebin.com/w0B6WMat
then:
- when the callback should be called, the application deadlocks.
What fixes it:
- don't run in uWSGI (e.g. use bottle's internal server) OR
- don't run from Upstart (run directly, LANG will be set) OR
- run from Upstart and export LANG to the environment
Any idea what's going on?
Regards,