-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[6.0.4] Error during the 'rescan' process. #10954
Comments
@icewind1991 any idea? |
@cdamken does the error always happen in that Normalizer class or does the error message sometimes says something else ? |
Please confirm that no symbolic links have been used in the data directory. These could cause infinite loops in some cases. |
How many users are on the system? |
@cdamken is the php module intl installed and enabled? As soon as that module is available we shall not use the fallback to Patchwork/PHP/Shim/Normalizer.php - researching ... |
@PVince81 No symbolic links |
okay - perform the scan for only those users which have issues with files which are not in sync |
As usual, please check the |
We have 4'936'829 files and 756'793 directories |
Don't expect that you can scan this in one run - as said above: perform the scan only for single users |
Shouldn't the scanner be able to support re-scanning 5M files / 700k directories without running out of memory? Might need to rethink our use of recursion in the scanner. |
@craigpg 👍
ownCloud scanner should not depend of 3th party apps!! Mainly Important tools should run without other dependencies! What happens with real systems with 5TB and 5000 users?
exactly, when we run .occ scan:files -- all we expect that it won't crash! |
Afaik the code base improved in this area in oc7 We are talking about how to solve this in the scope of oc6: do it step by step Read this as a work around to solve the issue right away |
I have 6.0.4 and after the suggestion from @DeepDiver1975 :
I did:
Works 😄 but I get this message many times:
@blizzz This was supposed to be fix in 6.0.3?: #7216 and #8052 |
@cdamken possibly because that |
Replacing the recursion as @craigpg suggested would only fix cases where there are very deep folder structures, as calling a function multiple times increases the memory footprint. A few things are cached in local variables during scanning, maybe these should be cleant up automatically after they're not useful any more. There's also a "change propagator" that will store a list of parent folders for which the etags need to be updated, whenever a change has been found. Not sure but that could also increase the memory usage in some situations. CC @icewind1991 |
i just putted the command with ls as example 😏 sorry. The exact command was:
|
I've tried multiple times to get rid of recursion in the file file scanner but never successfully due to the nature of the problem.
Since step 3 requires step 2 to be completed there is no way to move recursion to the end and do a tail recursion optimalization. |
@icewind1991 How big should be the cache if the user folder is 50Gb? |
@cdamken it's not an issue of file size, but number of files/folders and how many levels subfolders go. Metadata cache. |
@PVince81 Thanks for clearing the question 👍 Btw: Still scaning..... 4 1/2 hours.... about 151 messages like: #10954 (comment) appears a new message (only one) between them:
|
@PVince81 @DeepDiver1975 @blizzz Could be that #10954 (comment) happens because the accounts are not in LDAP anymore? |
Not sure, but could be an obsolete user, yes. You can check the |
Recursion is difficult to get right as witnessed by this ticket and the apparent fix in #11282. I think we should establish that recursion should be avoided. |
@icewind1991 Only the memory part is fixed in #11282, but the error when scanning specific users appear:
Is there any solution for this part? |
Only thing I can think of that causes that problem is an invalid user parameter (I get the same error when calling the scan command with a non existing user) and that's "addressed" in #11281 |
@cdamken are you able to retest this with the latest stable7? |
@icewind1991. Sadly it's a production system with oC6.0.5 and can not test it in stable7. Additionally those users exist. we test them individually and comes the same error. |
@cdamken please try with manually patching: From f14a8fe5a241b8127c0f5aeb9dec2d022133b675 Mon Sep 17 00:00:00 2001
From: Robin Appelman <[email protected]>
Date: Wed, 24 Sep 2014 15:48:54 +0200
Subject: [PATCH] Show a proper error message when trying to scan the
filesystem for a non existing user
---
apps/files/command/scan.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/apps/files/command/scan.php b/apps/files/command/scan.php
index 5fc6325..cd90e3f 100644
--- a/apps/files/command/scan.php
+++ b/apps/files/command/scan.php
@@ -68,7 +68,11 @@ class Scan extends Command {
if (is_object($user)) {
$user = $user->getUID();
}
- $this->scanFiles($user, $output);
+ if ($this->userManager->userExists($user)) {
+ $this->scanFiles($user, $output);
+ } else {
+ $output->writeln("<error>Unknown user $user</error>");
+ }
}
}
}
--
2.1.1 |
@cdamken What is the status here? |
But the user exist in LDAP and
and the user carlos can login and use his files. |
@blizzz can you do a scan of the filesystem for ldap users on the command line? Just trying to make sure this works ... I really need to set up an ldap server ... |
@butonic docker openldap + phpmyldapadmin: owncloud/administration#8 |
I tried it locally and it doesn't work with LDAP. Have a look at the
Then pick the owncloud name and use it when scanning:
This works for me. Ideally the name should automatically be recognized, not sure where that logic is @blizzz ? |
I was at first expecting this as well but got distracted by @cdamken In the browser console you can lookup the current usierid with |
In the table, the users where the scan works looks like:
and the user where the scan doesn't works looks like:
Somehow the users are added different. Is there anyway to make a rebuild of the table? |
@blizzz can you advice on how to fix the wrong owncloud_name ? |
@cdamken check the experts tab |
guys, the directory name is retrieved from getHome(), right, and not build together like $datadir . '/' . $uid? |
ok, after discussion with @PVince81, forget my last comment. |
@cdamken please use the buttons on the expert tab to clear the mappings and confirm that it fixed the issue, then we can close this ticket |
@cdamken the following lines of bash return the list of users. Run it from within the owncloud root dir or adjust the paths. To use instead of ls.
|
To summarize: the core issue here is that Not sure if the 150 users are really to be considered broken. But I think this would be something for a separate ticket. @cdamken let us know whether the SQL fix to get the whole user list works. |
After the workaround of @blizzz its a good way to make a full scan for now. I will close this issue. About the changes of the LDAP database and file sharing I will create another issue and provide the needed information. |
Expected behavior
run file scan and finish
Actual behavior
run file scan and error
Steps to reproduce
When I started the first rescan with the command 'php console.php files:scan -all' I got the following error:
I added more RAM to the machine, configured 10GB Memory in the php.ini file, but it didn't help:
Then I tried with setting "-1" to the size in php.ini, but it didn't help. I get this error:
How can we do this rescan without getting an error?
Server specifications
Redhat 6
PHP 5.5.3
MySQL 5.1.73
Data Storage mounted over NFS
@craigpg
The text was updated successfully, but these errors were encountered: