cvat: CVAT fails health check using >90% disk

My actions before raising this issue

Clone latest develop. docker-compose -f docker-compose.yml -f docker-compose.dev.yml build docker-compose up -d

Expected Behaviour

Startup and run application.

Current Behaviour

Computer runs very slowly as CVAT uses significant resources. When trying to login, the following occurs:

get http://10.0.253.33:9001/api/server/health/?format=json&org= {"Cache backend: default": "working", "DatabaseBackend": "working", "DiskUsage": "warning: 86c1cd71866c 92.4% disk usage exceeds 90%", "MemoryUsage": "working", "MigrationsHealthCheck": "working"}

Server logs:

2022-12-12 04:54:32,063 DEBG 'runserver' stderr output:
[Mon Dec 12 04:54:32.063061 2022] [wsgi:error] [pid 178:tid 139765320791808] ERROR:health-check:warning: 35a75041c750 92.4% disk usage exceeds 90%
[Mon Dec 12 04:54:32.063076 2022] [wsgi:error] [pid 178:tid 139765320791808] Traceback (most recent call last):
[Mon Dec 12 04:54:32.063085 2022] [wsgi:error] [pid 178:tid 139765320791808]   File "/opt/venv/lib/python3.8/site-packages/health_check/backends.py", line 30, in run_check

2022-12-12 04:54:32,063 DEBG 'runserver' stderr output:
[Mon Dec 12 04:54:32.063125 2022] [wsgi:error] [pid 178:tid 139765320791808]     self.check_status()

2022-12-12 04:54:32,063 DEBG 'runserver' stderr output:
[Mon Dec 12 04:54:32.063420 2022] [wsgi:error] [pid 178:tid 139765320791808]   File "/opt/venv/lib/python3.8/site-packages/health_check/contrib/psutil/backends.py", line 21, in check_status
[Mon Dec 12 04:54:32.063422 2022] [wsgi:error] [pid 178:tid 139765320791808]     raise ServiceWarning(
[Mon Dec 12 04:54:32.063422 2022] [wsgi:error] [pid 178:tid 139765320791808] health_check.exceptions.ServiceWarning: warning: 35a75041c750 92.4% disk usage exceeds 90%

2022-12-12 04:54:32,082 DEBG 'runserver' stderr output:
[Mon Dec 12 04:54:32.082022 2022] [wsgi:error] [pid 178:tid 139767587452672] [remote 172.27.0.4:39110] [2022-12-12 04:54:32,081] ERROR django.request: Internal Server Error: /api/server/health/
[Mon Dec 12 04:54:32.082094 2022] [wsgi:error] [pid 178:tid 139767587452672] [remote 172.27.0.4:39110] ERROR:django.request:Internal Server Error: /api/server/health/

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 2
  • Comments: 15 (5 by maintainers)

Most upvoted comments

@harrystuart , you can adjust health check limits (https://github.com/revsys/django-health-check/blob/master/health_check/conf.py)

Please try to define in cvat/settings/base.py the following variable:

HEALTH_CHECK = {
    "DISK_USAGE_MAX": 99
}

@harrystuart, @Harsturomai, @Ghaitharar, hi, could you please share and check the output of the following commands in the terminal:

docker exec -it -u django cvat_server python -c 'import os; print(os.statvfs("/"))'
docker exec -it -u django cvat_server python -c 'import psutil; print(psutil.disk_usage("/"))'
docker exec -it -u django cvat_server df -h /

I used CVAT on windows 10 to annotated a number of .mp4 videos that are collectively less than 1GB in size. When trying to extract the dataset, CVAT consumes more than 100GB and then report

@Ghaitharar, it can be related to video frame unpacking. If I understand correctly, you’re trying to export a task with images. In this case the video images will be saved on disk and then packed into an archive. If you’re exporting a task, please try to turn off the Save images option.

In general, I see few ways to handle the problem:

  • export just annotations, turn the Save images checkbox off image
  • turn off the use chunks switch during task creation image
  • check for the exported dataset cache and clean it with this command:
    docker exec -it cvat_server bash -c 'rm -r data/*/*/export_cache/'
    
    (if you see rm: cannot remove 'data/*/*/export_cache/': No such file or directory, everything is OK)
  • try to clear the cache with this command:
    docker exec -it cvat_server bash -c 'rm -r data/cache/'
    
  • turn off the use cache checkbox (note that this may slow down the workflow with videos)
  • Need to add into documentation more information about health check and its configuration
  • Need to fix creation of tasks with video files. By default, they are created with zip chunks with images

HEALTH_CHECK = { “DISK_USAGE_MAX”: 99 }

Are these settings somehow injectable without baking a new cvat docker image? I am “suffering” from the same issue, since my K8s nodes have little disk space, thus running into the limit preventing the webserver to start, even though cvat-backend-data volume is placed on another machine via nfs volume and has plenty space.

Is there a way to turn off use chunks after a task is created? I’v already created a number of tasks with this option enabled.

Unfortunately, no. I can suggest you to export the annotations without images, and then you can download images separately using SDK or CLI: cvat-cli frames --quality original --outdir task_<N>_images <task_id> (modify the command to fit your case).