exadel-inc / CompreFace

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

504 gateway time out #764

Closed ersaurabh101 closed 2 years ago

ersaurabh101 commented 2 years ago

I have created a VM instance in google cloud. It is 2core 4gb. Most of the time, it is giving this error of time out.

We are trying to match the face from base64 image. Please advise what is the best practice to avoid this error.

Attaching image for reference image

Best Regards

pospielov commented 2 years ago

Could you send the logs from the docker-compose logs command?

ersaurabh101 commented 2 years ago

Attaching all the logs for your reference. We are unable to use this instance since we created it 8 days ago. Please clearly mention minimum requirement for the same, it will surely help others in future.

I have 1 Question: Do we need more cores or more Ram ?? I wish to add approx 5000 [In 50 groups] faces in the DB and I want atleast 5 matches per second capable hardware. please advise.

these are logs from compreface-api, trying to show last 500 lines WhatsApp Image 2022-04-15 at 2 29 16 PM WhatsApp Image 2022-04-15 at 2 28 31 PM WhatsApp Image 2022-04-15 at 2 27 41 PM WhatsApp Image 2022-04-15 at 2 30 25 PM

WhatsApp Image 2022-04-15 at 2 26 38 PM WhatsApp Image 2022-04-15 at 2 25 57 PM WhatsApp Image 2022-04-15 at 2 25 17 PM WhatsApp Image 2022-04-15 at 2 24 35 PM WhatsApp Image 2022-04-15 at 2 23 49 PM WhatsApp Image 2022-04-15 at 2 22 53 PM WhatsApp Image 2022-04-15 at 2 21 54 PM WhatsApp Image 2022-04-15 at 2 31 45 PM WhatsApp Image 2022-04-15 at 2 31 00 PM

pospielov commented 2 years ago

You send logs only from compreface-api node. Could you send logs from compreface-core logs? If it's not working then probably you need more RAM. For 5000 faces probably you need about 8-10 Gb of RAM. The number of matches per second depends on the size of the input image and number of faces on it. To increase number of matches per second you can:

  1. Use GPU instance
  2. Add more compreface-api and compreface-core instances.
  3. Use a more powerful CPU instance.
ersaurabh101 commented 2 years ago

Thank you for your reply. I am upgrading my server now. Will send you compreface-logs soon