Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx timeout when exporting large project via POST /api/projects/{project_id}/exports #5811

Open
b-gran opened this issue May 2, 2024 · 2 comments

Comments

@b-gran
Copy link

b-gran commented May 2, 2024

Describe the bug
We experienced nginx timeout errors when using the recommended export snapshot API to export a large project.

The POST /api/projects/{project_id}/exports API succeeded for this large project prior to the 1.12.0 update.

The project has ~18000 tasks, ~25000 annotations, and each task has ~2kb of data. The size of the project's JSON export is ~110MB.

The nginx timeout errors have the following form:

2024/05/02 13:22:03 [warn] 21#21: *173314 upstream server temporarily disabled while reading response header from upstream, client: 10.128.xxx.xxx, server: , request: "POST /api/projects/14/exports HTTP/1.1", upstream: "http://127.0.0.1:8000/api/projects/14/exports", host: "<snip>"
2024/05/02 13:22:03 [error] 21#21: *173314 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.128.xxx.xxx, server: , request: "POST /api/projects/14/exports HTTP/1.1", upstream: "http://127.0.0.1:8000/api/projects/14/exports", host: "<snip>"

To Reproduce
Steps to reproduce the behavior:

  1. Create a large project with 18000 tasks, 25000 annotations, and ~2kb of data per task.
  2. POST /api/projects/{project_id}/exports
  3. Observe nginx timeout errors

Expected behavior
POST /api/projects/{project_id}/exports succeeds regardless of the size of the project size.

Environment (please complete the following information):

  • Label Studio version 1.12.0
@farioas
Copy link
Member

farioas commented May 2, 2024

Looks the backend went down because it either took > 90s to respond or lack of resources. Try to set env variable UWSGI_WORKER_HARAKIRI=0.

@sfrolich
Copy link

sfrolich commented May 6, 2024

Looks the backend went down because it either took > 90s to respond or lack of resources. Try to set env variable UWSGI_WORKER_HARAKIRI=0.

We tried setting UWSGI_WORKER_HARAKIRI to 361 and 0 but the error still occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants