Skip to content

Memory leak when reloading model #11863

Discussion options

You must be logged in to vote

@adrianeboyd The following avoided any complications:

  1. We changed our api web server app to gunicorn. This was due to two points: 1- it supports preload and 2- we could setup max-request limit to forcely restart each worker. This was something that the uvicorn wasn't best suited for.
  2. We had issues with preload since workers were not able to return our requests. This was a complication caused by thread safety and was resolved with 1- force set_num_threads before loading spacy package.

With this two modifications we achieved:

  1. Memory leak issue was handled with preloading preserving the master worker app load
  2. The new vocab added only changed the memory from slave workers which was limited …

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@adrianeboyd
Comment options

@leonballonigomes
Comment options

Comment options

You must be logged in to vote
2 replies
@adrianeboyd
Comment options

@lsmith77
Comment options

Answer selected by leonballonigomes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf / memory Performance: memory use scaling Scaling, serving and parallelizing spaCy
4 participants