Error Search (for TAGS)

Nextcloud version: 25.0.5
CentOS Linux release 8.5.2111
Apache/2.4.37
PHP version 7.4.33
MariaDB 10.3

When search anything return results for everything except TAGS (give an error cannot search for TAG).
On MariaDB I see queries for all options appear and disappear except for TAGS and that queries stay “creating sort index” for infinity, never stops and Load of MariaDB and Server crash.

Is this the first time you’ve seen this error? Y (after update to v25, on v24 search appear to not search on TAGS

Steps to replicate it:

  1. Open a browser and login
  2. Do a search for anything on magnifier icon on top right
  3. Wait for responses

Nothing on log related to this.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

  'dbtype' => 'mysql',
  'version' => '25.0.5.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' =>
  'dbpassword' =>
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => true,
  'filelocking.ttl' => 60,
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'log.condition' =>
  array (
    'apps' =>
    array (
      0 => 'admin_audit',
    ),
  ),
  'trashbin_retention_obligation' => '90, 91',

Nothing on apache log related.

Nothing on admin events related.

Example query “stucked”:

SELECT `file`.`fileid`,
 `storage`,
 `path`,
 `path_hash`,
 `file`.`parent`,
 `file`.`name`, 
 `mimetype`,
 `mimepart`,
 `size`,
 `mtime`,
 `storage_mtime`,
 `encrypted`,
 `etag`,
 `permissions`,
 `checksum`,
 `unencrypted_size` 
 FROM `oc_filecache` `file` 
 LEFT JOIN `oc_vcategory_to_object` `tagmap` ON `file`.`fileid` = `tagmap`.`objid` 
 LEFT JOIN `oc_systemtag_object_mapping` `systemtagmap` ON (`file`.`fileid` = `systemtagmap`.`objectid`) AND (`systemtagmap`.`objecttype` = 'files') 
 LEFT JOIN `oc_vcategory` `tag` ON (`tagmap`.`type` = `tag`.`type`) AND (`tagmap`.`categoryid` = `tag`.`id`) AND (`tag`.`type` = 'files') AND (`tag`.`uid` = 'XXXXXX') 
 LEFT JOIN `oc_systemtag` `systemtag` ON (`systemtag`.`id` = `systemtagmap`.`systemtagid`) AND (`systemtag`.`visibility` = '1') 
 WHERE ((`tag`.`category`  COLLATE utf8mb4_general_ci LIKE '%XXXXXX%') OR (`systemtag`.`name`  COLLATE utf8mb4_general_ci LIKE '%XXXXXX%')) AND (((`storage` = XX) AND ((`path` = 'files') OR (`path` LIKE 'files/%'))) OR ((`storage` = XX) AND ((`path` = 'XXXXXX') OR (`path` LIKE 'XXXXXX'))) OR ((`storage` = 18) AND ((`path` = 'XXXXXX') OR (`path` LIKE 'XXXXXXX'))) OR ((`storage` = XX) AND ((`path` = 'XXXXXX') OR (`path` LIKE 'XXXXXX'))) OR ((`storage` = XX) AND ((`path` = 'XXXXXX') OR (`path` LIKE 'XXXXXX'))) OR ((`storage` = XX) AND ((`path` = 'XXXXXX') OR (`path` LIKE 'XXXXXX')))) ORDER BY 'mtime' + '0' DESC LIMIT 5;

This forum is using markdown-syntax to format the posts.

Your post is unreadable, since you did not enter the code from your querry inside of a Fenced Codeblock

Could you please edit your post accordingly, as it torments my “inner Monk”. :wink:

it’s done.
thanks for advice

1 Like

I got the same behaviour, mysql using full cpu, had to kill those queries manualy.
Looks like a bug.

1 Like