Question #135957 on Graphite changed: https://answers.launchpad.net/graphite/+question/135957
chrismd proposed the following answer: When you send carbon-cache a SIGTERM, the main thread will exit but the interpreter will remain running until all non-daemon threads have stopped. There is only one other thread in carbon-cache and it is not a daemon thread, that is the writeForever thread. This thread will exit once the writeCachedDataPoints function completes, which implies the cache is empty. Keep in mind this is no guarantee that you won't see gaps in your data, once the main thread exits carbon-cache's listeners are closed and your clients will be unable to send data points to it. The clients will need to buffer their datapoints and reconnect to carbon once it is back up. That's the intended behavior anyways, it is always possible there is a bug. Which version of carbon are you using? How are you killing carbon-cache? (carbon-cache.py stop, a manual kill, or kill -9?). Note that doing 'carbon-cache.py stop' will always return immediately even though the carbon-cache daemon may continue running for a while after). How large is your cache when you kill it (as measured by carbon.agents.<server>.cache.size)? It is possible that its getting written out very quickly. On my system, where my cache size averages around 300k - 700k it takes anywhere from a few seconds to several minutes. -- You received this question notification because you are a member of graphite-dev, which is an answer contact for Graphite. _______________________________________________ Mailing list: https://launchpad.net/~graphite-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~graphite-dev More help : https://help.launchpad.net/ListHelp

