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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solaris: System Memory reported as Unknown, will not run Background_Job #415

Open
ytc-1 opened this issue Dec 27, 2020 · 5 comments
Open

Comments

@ytc-1
Copy link

ytc-1 commented Dec 27, 2020

Hey, Thanks for reporting issues back to Nextcloud Face Recognition. Please, try to complete this report in detail so we can help you easier. 馃槃

Make sure you read all the documentation, and the FAQ, and that the issue has not been reported before. 馃槈

Expected behaviour

php occ -vvv face:backgroun_job -u PicTest -t 900
should start recognition process

Actual behaviour

Tells me there is not enought RAM
1/10 - Executing task CheckRequirementsTask (Check all requirements)
System: SunOS
System memory: Unknown
PHP Memory Limit: 2147483648
Your system does not meet the minimum of memory requirements.

Basically, the PHP code is not returning the amount of RAM available.
What code is it using that I can fudge from the OS level as I presume it does not know how to get the ram in a Solaris zone.

Steps to reproduce

  1. Install dlib/pdlib https://github.com/goodspb/pdlib
  2. Ran make test (worked)
  3. Updated memory_limit = 4096M in php.ini
  4. Installed face recognition and enabled
  5. Ran a test on CLI against a test user

Server configuration

  • Operating system:
    Solaris 11.4 ,NC runs in a zone
    Hardware has 48Gb RAM

  • Pdlib version:
    1.0.2

  • How is DLib installed: Make sure it is working correctly with this tool

  • Won't installl
    Welcome to pdlib min test suite for Facerecognition app...

First we try to open the models... Done

Processing file: input/Big Bang Theory.jpg
PHP Fatal error: Uncaught Exception: jpeg_loader: error while loading image: Wrong JPEG library version: library is 62, caller expects 80 in /var/tmp/pdlib-min-test-suite-master/scripts/face_detect.php:35
Stack trace:
#0 /var/tmp/pdlib-min-test-suite-master/scripts/face_detect.php(35): CnnFaceDetection->detect('input/Big Bang ...')
#1 /var/tmp/pdlib-min-test-suite-master/scripts/face_detect.php(53): findFaces('input/Big Bang ...')
#2 {main}
thrown in /var/tmp/pdlib-min-test-suite-master/scripts/face_detect.php on line 35
*** Error code 255
make: Fatal error: Command failed for target `php-test'

  • How is PDlib installed: Make sure it is working correctly with this tool

  • PHP version:
    7.3

  • Web server:
    Apache24

  • Database:
    MySQL

  • Nextcloud version:
    19.0.6

Client configuration

  • Browser:
    N/A
  • Operating system:
    Solaris 11.4

Logs

Background task log with debug.

sudo -u apache php occ -vvv face:background_job 1/10 - Executing task CheckRequirementsTask (Check all requirements) System: SunOS System memory: Unknown PHP Memory Limit: 2147483648 Your system does not meet the minimum of memory requirements. Face recognition application requires at least 1 GB of system memory. See https://github.com/matiasdelellis/facerecognition/wiki/Performance-analysis-of-DLib%E2%80%99s-CNN-face-detection for more details

Fill an issue here if that doesn't help: https://github.com/matiasdelellis/facerecognition/issues
Task CheckRequirementsTask signalled we should not continue, bailing out

Insert your background log here

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@matiasdelellis
Copy link
Owner

Hi @ytc-1
Memory management is very important in this application since it can be a very intensive task and consume a lot of memory. And therefore, we must make sure we know the system memory..
Unfortunately, now this function is only implemented for Linux, since it is the only thing I have experience..

https://github.com/matiasdelellis/facerecognition/blob/master/lib/Helper/MemoryLimits.php#L96

Of course happy to accept patches for other architectures..
Sorry I don't have a better answer today .. 馃槥

@matiasdelellis matiasdelellis changed the title System Memory reported as Unknown, will not run Background_Job Solaris: System Memory reported as Unknown, will not run Background_Job Jan 15, 2021
@ytc-1
Copy link
Author

ytc-1 commented Jan 17, 2021

I don't code these days, what is it that is needed to understand the memory?

@b10102016
Copy link

b10102016 commented May 1, 2021

Hi @ytc-1

For workaround, edit the file $(NEXTCLOUD_APPS)/facerecognition/lib/Helper/MemoryLimits.php.

 79         public static function getSystemMemory(): float {
 80                 if (php_uname("s") !== "Linux")
 81                         return  -1; // change the return value to match your system memory, unit in byte

Then run the command, ./occ app:update facerecognition

@ytc-1
Copy link
Author

ytc-1 commented May 6, 2021

Hi @ytc-1

For workaround, edit the file $(NEXTCLOUD_APPS)/facerecognition/lib/Helper/MemoryLimits.php.

 79         public static function getSystemMemory(): float {
 80                 if (php_uname("s") !== "Linux")
 81                         return  -1; // change the return value to match your system memory, unit in byte

Then run the command, ./occ app:update facerecognition

That moved me on, thanks.
It is "churning away" now :-)

@ytc-1
Copy link
Author

ytc-1 commented May 7, 2021

FYI, if you want me to test any code to be specific to Solaris then I am happy to test it. Any changes would then be most likely to work woth SmartOS or any other OpenSolaris (Illumos) derivatives.

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

No branches or pull requests

3 participants