exadel-inc / CompreFace

Leading free and open-source face recognition system
https://exadel.com/accelerator-showcase/compreface/
Apache License 2.0
5.7k stars 775 forks source link

Error 502 #852

Open Ahmedsaber9 opened 2 years ago

Ahmedsaber9 commented 2 years ago

Describe the bug Hi I have been using CompreFace for 4 weeks and everything is just working perfectly, but somehow CompreFace started throwing 50x errors in API 502 from Nginx, and from the web-GUI also.

here are my logs, it started after the last 200 req that I got when the system was working.

docker logs compreface-core https://paste.c-net.org/BrickAmount

docker logs compreface-postgres-db https://paste.c-net.org/BeverageQuebec

I found a problem that my disk is full, and I resize my disk as well.

Update :Resolved by resizing my disk as well, my disk wasn't resized by my first attempt.

image

docker ps

image

Thanks

Ahmedsaber9 commented 2 years ago

@pospielov your help is highly appreciated

Ahmedsaber9 commented 2 years ago

Resolved by resizing my disk as well, my disk wasn't resized by my first attempt

Ahmedsaber9 commented 2 years ago

@pospielov could you tell you to clean the files for CompreFace ? i don't want to resize my disk every time, also i fell something is eating my disk using docker. any help with this?

pospielov commented 2 years ago

That is interesting. What container eats the most disk space? you can find it by running docker system df -v

Ahmedsaber9 commented 2 years ago

image

Ahmedsaber9 commented 2 years ago

what is suspicious_sanderson ?

Ahmedsaber9 commented 2 years ago

How to enter my data? or file system for every part of the system? also i know that there's a flag that stops the program from storing data, how can I find it? thanks.

pospielov commented 2 years ago

what is suspicious_sanderson ?

It looks like this is a container that was created when you just installed docker and then run docker run hello-world

from the results docker system df -v I don't see any issues. Containers use ~255Mb extra space. Volumes ~70Mb Could you find the exact folder that takes so much space in /var/lib/docker/?

How to enter my data? or file system for every part of the system? also i know that there's a flag that stops the program from storing data, how can I find it? thanks.

Sorry, I didn't get the question. What data do you mean?

Ahmedsaber9 commented 2 years ago

Thanks for your response, I mean the pic that sends throw API where could I find it

pospielov commented 2 years ago

When you add an image to the face collection, you can download it then using REST API: https://github.com/exadel-inc/CompreFace/blob/master/docs/Rest-API-description.md#download-an-image-example-of-the-subject-by-id You can look at how it works on our UI on the manage collection page

When you send an image for recognition, detection, or verification, the images are not saved anywhere.

Ahmedsaber9 commented 2 years ago

Thanks for your response I made an assumption that there was a saving pic or something like that regarding that issue https://github.com/exadel-inc/CompreFace/issues/723 save_images_to_db=false in case I enable it where would it save? Thanks

pospielov commented 2 years ago

This flag says if CompreFace should save photos in face collection. By default, save_images_to_db=true. For the facial recognition process photos are not needed. This is why you can disable saving. In this case "manage collection" page will be useless because you won't see photos, but the recognition will work.

Ahmedsaber9 commented 2 years ago

you said, "When you send an image for recognition, detection, or verification, the images are not saved anywhere." your last reply looks conflicting with the quoted one. correct me if I'm wrong :/ btw I'm using the API /api/v1/verification/verify

pospielov commented 2 years ago

Face collection exists only in the Face Recognition service Here are the rest endpoints for working with face collection. Only this rest endpoints are affected by save_images_to_db=true flag: https://github.com/exadel-inc/CompreFace/blob/master/docs/Rest-API-description.md#managing-subjects https://github.com/exadel-inc/CompreFace/blob/master/docs/Rest-API-description.md#managing-subject-examples

This rest endpoints are runtime endpoints and not affected by this flag. They never save images. It doesn't make any sense to save images during recognition process. https://github.com/exadel-inc/CompreFace/blob/master/docs/Rest-API-description.md#recognize-faces-from-a-given-image https://github.com/exadel-inc/CompreFace/blob/master/docs/Rest-API-description.md#verify-faces-from-a-given-image https://github.com/exadel-inc/CompreFace/blob/master/docs/Rest-API-description.md#face-detection-service https://github.com/exadel-inc/CompreFace/blob/master/docs/Rest-API-description.md#face-verification-service https://github.com/exadel-inc/CompreFace/blob/master/docs/Rest-API-description.md#base64-support