🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
chore: terminate tokenizer workers before freeing them from memory (#8925)
Steffen Schmitz3cbe3bd1bcb3
diff --git a/worker/src/utils/shutdown.ts b/worker/src/utils/shutdown.tsindex e9b9a18662..646eab9984 100644--- a/worker/src/utils/shutdown.ts+++ b/worker/src/utils/shutdown.ts@@ -37,9 +37,6 @@ export const onShutdown: NodeJS.SignalsListener = async (signal) => {// Shutdown clickhouse connectionsawait ClickHouseClientManager.getInstance().closeAllConnections();- freeAllTokenizers();- logger.info("All tokenizers are cleaned up from memory.");-// Shutdown tokenization worker threadstry {await getTokenCountWorkerManager().terminate();@@ -48,5 +45,8 @@ export const onShutdown: NodeJS.SignalsListener = async (signal) => {logger.error("Error terminating token count worker threads", error);}+ freeAllTokenizers();+ logger.info("All tokenizers are cleaned up from memory.");+logger.info("Shutdown complete, exiting process...");};