FunASR icon indicating copy to clipboard operation
FunASR copied to clipboard

中文实时听写服务Docker镜像funasr-runtime-sdk-online-cpu-0.1.12存在内存泄露问题

Open wyc941012 opened this issue 7 months ago • 5 comments

Notice: In order to resolve issues more efficiently, please raise issue following the template. (注意:为了更加高效率解决您遇到的问题,请按照模板提问,补充细节)

🐛 Bug

使用最新版本的实时听写服务镜像funasr-runtime-sdk-online-cpu-0.1.12,使用websocket的方式连接到服务,在线上运行一段时间之后,有少量的连接调用服务,观察到容器内存持续上升且不释放。

Image

To Reproduce

Steps to reproduce the behavior (always include the command you ran):

  1. 镜像启动: sudo docker pull
    registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.12 mkdir -p ./funasr-runtime-resources/models sudo docker run -p 10096:10095 -it --privileged=true
    -v $PWD/funasr-runtime-resources/models:/workspace/models
    registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.12

  2. 服务启动: cd FunASR/runtime nohup bash run_server_2pass.sh
    --download-model-dir /workspace/models
    --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx
    --model-dir damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx
    --online-model-dir damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx
    --punc-dir damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx
    --lm-dir damo/speech_ngram_lm_zh-cn-ai-wesp-fst
    --itn-dir thuduj12/fst_itn_zh
    --model_thread_num 1
    --hotword /workspace/models/hotwords.txt > log.txt 2>&1 &

3.客户端通过websocket的方式连接,语音识别结束后断开websocket连接。

4.观察线上内存监控曲线发现内存会持续上升且不释放。

Code sample

Expected behavior

Environment

  • OS (e.g., Linux): Linux
  • FunASR Version (e.g., 1.0.0):
  • ModelScope Version (e.g., 1.11.0): 1.18.1
  • PyTorch Version (e.g., 2.0.0):
  • How you installed funasr (pip, source): docker镜像
  • Python version: 3.8.18
  • GPU (e.g., V100M32)
  • CUDA/cuDNN version (e.g., cuda11.7):
  • Docker version (e.g., funasr-runtime-sdk-cpu-0.4.1):funasr-runtime-sdk-online-cpu-0.1.12
  • Any other relevant information:

Additional context

wyc941012 avatar Apr 07 '25 03:04 wyc941012