dmlc / dmlc/xgboost

Gunicorn preload flag not working with latest XGBoost version (post 1.6.0)

Open
#8,040 6 comments 0 reactions 0 assignees View on GitHub
status: help wanted
Dominant language
C++
Stars
28.8k
Forks
8.9k
Avg merge
1d 12h
Merged PRs (30d)
54

Description

We have an XGBoost model served via a Flask app on Heroku. This Flask app is launched using gunicorn.
We are using the `--preload` option of gunicorn in order to mutualize memory consumption of the several workers that are launched (4).

This setup was working well until the upgrade to version 1.6.0 when it stopped working. Now the predict function of our XGBClassifier hangs forever.

**Environment:**
```
Flask==2.1.2
gunicorn==20.1.0
numpy==1.22.4
xgboost==1.6.1
```

**Gunicorn command:**
`web: gunicorn --preload -w 4 run:app`

**Error:**
```
[2022-06-29 18:18:31 +0200] [17983] [CRITICAL] WORKER TIMEOUT (pid:17984)
[2022-06-29 18:18:32 +0200] [17983] [WARNING] Worker with pid 17984 was terminated due to signal 9
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.