# Nextcloud creating never-ending mysql threads

**URL:** <https://help.nextcloud.com/t/nextcloud-creating-never-ending-mysql-threads/157752>\
**Category:** ℹ️ Support\
**Tags:** docker, mysql\
**Created:** [March 14, 2023, 2:40am UTC](https://help.nextcloud.com/t/nextcloud-creating-never-ending-mysql-threads/157752 "2023-03-14T02:40:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wonx](https://help.nextcloud.com/letter_avatar/wonx/32/6_449c533f586939b6e5f246632a46421f.png) [@wonx](https://help.nextcloud.com/u/wonx)\
**Post date:** [March 14, 2023, 2:40am UTC](https://help.nextcloud.com/t/nextcloud-creating-never-ending-mysql-threads/157752/1 "2023-03-14T02:40:45Z")

</div>

> **Support intro**
>
> Sorry to hear you’re facing problems 🙁
> 
> _**[help.nextcloud.com](http://help.nextcloud.com) is for home/non-enterprise users. If you’re running a business, paid support can be accessed via [portal.nextcloud.com](http://portal.nextcloud.com) where we can ensure your business keeps running smoothly.**_
> 
> In order to help you as quickly as possible, before clicking **Create Topic** please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
> 
> ```
> example
> 
> ```
> 
> Or for longer, use three backticks above and below the code snippet:
> 
> ```auto
> longer
> example
> here
> 
> ```
> 
> Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can ❤

Nextcloud version _(eg, 20.0.5)_: `Nextcloud Hub 3 (25.0.4)`  
Operating system and version _(eg, Ubuntu 20.04)_: `Debian Buster`  
Apache or nginx version _(eg, Apache 2.4.25)_: `nginx`  
PHP version _(eg, 7.4)_: `7.4.26`  
I’m using a docker image, from: [Docker](https://hub.docker.com/r/linuxserver/nextcloud)

The issue you are facing:  
Every few minutes/hours, new threads of `php-fpm: pool www` appear, which query the mysql indefinitely. Each query uses 100% of a core in my server, and every few minutes a new one will appear, so the cpu usage will keep growing.

In the mysql server, this is the query that never ends:

```auto
SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time` FROM `oc_filecache` `filecache` LEFT JOIN `oc_filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` WHERE (`name` IN ('.noimage', '.nomedia')) AND (`storage` = 35)

```

Running that query manually on the nextcloud database, takes 3 seconds at most.

 ![Screenshot_20230313_222027](https://help.nextcloud.com/uploads/default/original/3X/4/0/40b1e86913f314d008f10508c5fd006ffed2a475.png)

 ![Screenshot_20230313_222042](https://help.nextcloud.com/uploads/default/original/3X/3/d/3d270054fc6f7f68631da227b6799c9bb833b217.png)

It started a few days ago, a week or two ago at most.

As a workaround, i run `pkill -f -e -c 'php-fpm: pool www'`, which solved the issue temporarily, but after a while these threads come back. I suspect they have to do with a cron job inside nextcloud (I can see `php7 -f /config/www/nextcloud/cron.php` togther with these php-fpm threads)

This is something new that never happened before, and I’ve been using Nextcloud for more than a year now. Recently, I installed memories ([https://apps.nextcloud.com/apps/memories](https://apps.nextcloud.com/apps/memories)), which uses Preview Generator ([Preview Generator - Apps - App Store - Nextcloud](https://apps.nextcloud.com/apps/previewgenerator)) for the thumbnails, so I don’t know if that could be related.

By the way, I don’t see anything related in the log files. How could I check what is being run during the cron jobs from nextcloud?

Is this the first time you’ve seen this error? _(Y/N)_: Y

Steps to replicate it:

1. Just wait a few hours at most.
2. Check the CPU usage and the running processes with a tool like htop.

The output of your Nextcloud log in **Admin \> Logging** :

```auto
Informació	no app in context	Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route "contacts.contacts.directcircle" as such route does not exist. 2023-03-13T22:33:24-0400
Informació	no app in context	Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2023-03-13T22:23:42-0400
Informació	no app in context	Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2023-03-13T22:23:41-0400
Informació	no app in context	Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2023-03-13T22:23:40-0400
Informació	no app in context	Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route "contacts.contacts.directcircle" as such route does not exist. 2023-03-13T22:21:33-0400
Informació	no app in context	Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route "contacts.contacts.directcircle" as such route does not exist. 2023-03-13T22:19:36-0400
Informació	no app in context	Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route "contacts.contacts.directcircle" as such route does not exist. 2023-03-13T22:18:01-0400
Informació	no app in context	Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route "contacts.contacts.directcircle" as such route does not exist. 2023-03-13T22:10:02-0400
Error	PHP	Error: Undefined offset: 1 at /config/www/nextcloud/apps/dav/lib/BulkUpload/MultipartRequestParser.php#183 2023-03-13T22:08:36-0400
Error	PHP	Error: Undefined offset: 1 at /config/www/nextcloud/apps/dav/lib/BulkUpload/MultipartRequestParser.php#183 2023-03-13T22:08:35-0400
Error	PHP	Error: Undefined offset: 1 at /config/www/nextcloud/apps/dav/lib/BulkUpload/MultipartRequestParser.php#183 2023-03-13T22:08:34-0400

```

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

```auto
<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data/',
  'instanceid' => 'oc73aahzj0mc',
  'passwordsalt' => 'iSS/LC1b9vxxxxxxx8BDwL81OeuCI',
  'secret' => 'HeG2CRUQmbxxxxxxxZ7xPbQNwA2+XH4jSAlqxxxxxqeHOK9KDqlZN2u6jhyS',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.afsDfd.com',
    1 => 'asdfasdf:8082',
    2 => 'xx.xx.xx:8082',
    3 => 'xx.xx.xx:8081',
    4 => '62.xx.xx.xx',
  ),
  'dbtype' => 'mysql',
  'version' => '25.0.4.1',
  'overwrite.cli.url' => 'https://nextcloud.asdfasdf.com',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.xxx:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'asdfasdf',
  'installed' => true,
  'share_folder' => '/Shared',
  'maintenance' => false,
  'filelocking.enabled' => false,
  'theme' => '',
  'loglevel' => 1,
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'default_phone_region' => 'ES',
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\Illustrator',
    1 => 'OC\\Preview\\HEIC',
    2 => 'OC\\Preview\\Movie',
    3 => 'OC\\Preview\\MSOffice2003',
    4 => 'OC\\Preview\\MSOffice2007',
    5 => 'OC\\Preview\\MSOfficeDoc',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\PNG',
    8 => 'OC\\Preview\\JPEG',
    9 => 'OC\\Preview\\GIF',
    10 => 'OC\\Preview\\BMP',
    11 => 'OC\\Preview\\XBitmap',
    12 => 'OC\\Preview\\MP3',
    13 => 'OC\\Preview\\TXT',
    14 => 'OC\\Preview\\MarkDown',
    15 => 'OC\\Preview\\OpenDocument',
    16 => 'OC\\Preview\\Krita',
  ),
  'mail_from_address' => 'asdfasdf',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'gmail.com',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '587',
  'mail_smtpname' => 'asdfasdf',
  'mail_smtppassword' => 'asdfasdf',
  'mail_smtpsecure' => 'tls',
  'app_install_overwrite' => 
  array (
    0 => 'files_excludedirs',
  ),
  'memories.exiftool' => '/config/www/nextcloud/apps/memories/exiftool-bin/exiftool-amd64-musl',
  'updater.secret' => '$2y$10$vb8IIWzUBEIhnjEbdUDasdfasdfasdfasdf9ClUiXGNB6LDTi2cHjq',
);

```

The output of your Apache/nginx/system log in `/var/log/ ____ `:

```auto
158.xx.xx.xx - user [14/Mar/2023:03:33:42 +0100] "PROPFIND /remote.php/dav/files/user/PersonalMarc HTTP/1.1" 207 9502 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - - [14/Mar/2023:03:33:42 +0100] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 112 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:33:51 +0100] "GET /settings/admin/logging HTTP/1.1" 200 9996 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:33:52 +0100] "GET /ocs/v2.php/search/providers?from=%2Fsettings%2Fadmin%2Flogging HTTP/1.1" 200 247 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:33:52 +0100] "GET /apps/logreader/settings HTTP/1.1" 200 107 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:33:52 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 81 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:33:52 +0100] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 112 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:33:53 +0100] "GET /apps/logreader/get?offset=0&count=50&levels=11111 HTTP/1.1" 200 7892 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - user [14/Mar/2023:03:33:55 +0100] "GET /ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 485 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:33:55 +0100] "GET /remote.php/dav/avatars/user/128.png HTTP/1.1" 200 180 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - - [14/Mar/2023:03:34:14 +0100] "GET /apps/logreader/poll?lastReqId=BbvcWd5osxYcSUhGOFLu HTTP/1.1" 200 22 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:34:23 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - user [14/Mar/2023:03:34:26 +0100] "GET /ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 485 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:34:26 +0100] "GET /remote.php/dav/avatars/user/128.png HTTP/1.1" 200 180 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - - [14/Mar/2023:03:34:34 +0100] "GET /apps/logreader/poll?lastReqId=BbvcWd5osxYcSUhGOFLu HTTP/1.1" 200 22 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - user [14/Mar/2023:03:34:36 +0100] "GET /ocs/v2.php/apps/user_status/api/v1/user_status?format=json HTTP/1.1" 200 148 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:34:36 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:34:36 +0100] "PROPFIND /remote.php/dav/files/user/ HTTP/1.1" 207 259 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:34:36 +0100] "PROPFIND /remote.php/dav/files/user/ HTTP/1.1" 207 1267 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:34:37 +0100] "PROPFIND /remote.php/dav/files/user/MediaBox HTTP/1.1" 207 813 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:34:38 +0100] "PROPFIND /remote.php/dav/files/user/PersonalMarc HTTP/1.1" 207 9503 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - - [14/Mar/2023:03:34:53 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:34:55 +0100] "GET /apps/logreader/poll?lastReqId=BbvcWd5osxYcSUhGOFLu HTTP/1.1" 200 22 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - user [14/Mar/2023:03:34:57 +0100] "GET /ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 485 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:34:57 +0100] "GET /remote.php/dav/avatars/user/128.png HTTP/1.1" 200 180 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - - [14/Mar/2023:03:35:15 +0100] "GET /apps/logreader/poll?lastReqId=BbvcWd5osxYcSUhGOFLu HTTP/1.1" 200 22 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:35:23 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - user [14/Mar/2023:03:35:27 +0100] "GET /ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 485 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:35:27 +0100] "GET /remote.php/dav/avatars/user/128.png HTTP/1.1" 200 180 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - - [14/Mar/2023:03:35:36 +0100] "GET /apps/logreader/poll?lastReqId=BbvcWd5osxYcSUhGOFLu HTTP/1.1" 200 22 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - user [14/Mar/2023:03:35:36 +0100] "GET /ocs/v2.php/apps/user_status/api/v1/user_status?format=json HTTP/1.1" 200 148 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:35:36 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:35:36 +0100] "PROPFIND /remote.php/dav/files/user/ HTTP/1.1" 207 259 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:35:36 +0100] "PROPFIND /remote.php/dav/files/user/ HTTP/1.1" 207 1266 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:35:37 +0100] "PROPFIND /remote.php/dav/files/user/MediaBox HTTP/1.1" 207 815 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:35:38 +0100] "PROPFIND /remote.php/dav/files/user/PersonalMarc HTTP/1.1" 207 9503 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - - [14/Mar/2023:03:35:53 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:35:56 +0100] "GET /apps/logreader/poll?lastReqId=BbvcWd5osxYcSUhGOFLu HTTP/1.1" 200 22 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - user [14/Mar/2023:03:35:57 +0100] "GET /ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 485 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:35:58 +0100] "GET /remote.php/dav/avatars/user/128.png HTTP/1.1" 200 180 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - - [14/Mar/2023:03:36:17 +0100] "GET /apps/logreader/poll?lastReqId=BbvcWd5osxYcSUhGOFLu HTTP/1.1" 200 22 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:36:23 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - user [14/Mar/2023:03:36:27 +0100] "GET /ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 485 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:36:28 +0100] "GET /remote.php/dav/avatars/user/128.png HTTP/1.1" 200 180 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:36:36 +0100] "GET /ocs/v2.php/apps/user_status/api/v1/user_status?format=json HTTP/1.1" 200 149 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:36:36 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:36:36 +0100] "PROPFIND /remote.php/dav/files/user/ HTTP/1.1" 207 260 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:36:37 +0100] "PROPFIND /remote.php/dav/files/user/ HTTP/1.1" 207 1270 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:36:38 +0100] "PROPFIND /remote.php/dav/files/user/MediaBox HTTP/1.1" 207 814 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:36:38 +0100] "PROPFIND /remote.php/dav/files/user/PersonalMarc HTTP/1.1" 207 9500 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - - [14/Mar/2023:03:36:40 +0100] "GET /apps/logreader/poll?lastReqId=BbvcWd5osxYcSUhGOFLu HTTP/1.1" 200 22 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:36:53 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - user [14/Mar/2023:03:36:58 +0100] "GET /ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 485 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - user [14/Mar/2023:03:36:58 +0100] "GET /remote.php/dav/avatars/user/128.png HTTP/1.1" 200 180 "-" "Mozilla/5.0 (Linux) mirall/3.7.3-20230210.154208.5f9fa597e-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-67-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
158.xx.xx.xx - - [14/Mar/2023:03:37:01 +0100] "GET /apps/logreader/poll?lastReqId=BbvcWd5osxYcSUhGOFLu HTTP/1.1" 200 22 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
158.xx.xx.xx - - [14/Mar/2023:03:37:22 +0100] "GET /apps/logreader/poll?lastReqId=BbvcWd5osxYcSUhGOFLu HTTP/1.1" 200 22 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
```

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [March 14, 2023, 6:37am UTC](https://help.nextcloud.com/t/nextcloud-creating-never-ending-mysql-threads/157752/2 "2023-03-14T06:37:14Z")

</div>

sound similar to [MYSQL high cpu usage](https://help.nextcloud.com/t/mysql-high-cpu-usage/157636) the problem there was recognize app.

> [@wonx](#):
>
> Recently, I installed memories ([https://apps.nextcloud.com/apps/memories](https://apps.nextcloud.com/apps/memories)), which uses Preview Generator ([Preview Generator - Apps - App Store - Nextcloud](https://apps.nextcloud.com/apps/previewgenerator)) for the thumbnails, so I don’t know if that could be related.

this definitely could be a reason - preview generator could consume lot of resources. you might want to adjust the settings: [i-dont-want-to-generate-all-the-preview-sizes](https://github.com/nextcloud/previewgenerator#i-dont-want-to-generate-all-the-preview-sizes).

---

<div class="post-metadata">

**Author:** ![wonx](https://help.nextcloud.com/letter_avatar/wonx/32/6_449c533f586939b6e5f246632a46421f.png) [@wonx](https://help.nextcloud.com/u/wonx)\
**Post date:** [March 14, 2023, 8:50pm UTC](https://help.nextcloud.com/t/nextcloud-creating-never-ending-mysql-threads/157752/3 "2023-03-14T20:50:46Z")

</div>

Yes, it totally looks like the same issue. Apparently it had to do with the “Recognizer” app. There was an update this morning, so let’s hope it has already been fixed. I can rule out Preview Generator, since I had it disabled for the whole day yesterday and the issue reappeared.

---

<div class="post-metadata">

**Author:** ![scubamuc](https://help.nextcloud.com/user_avatar/help.nextcloud.com/scubamuc/32/63165_2.png) [@scubamuc](https://help.nextcloud.com/u/scubamuc)\
**Post date:** [August 14, 2024, 11:17am UTC](https://help.nextcloud.com/t/nextcloud-creating-never-ending-mysql-threads/157752/4 "2024-08-14T11:17:47Z")

</div>

@wwe, this issue could be reproduced and cause is quite certainly ‘preview generator app’ , see [my notes](https://github.com/scubamuc/wiki-md/blob/scubamuc-wiki/NEXTCLOUD.snap-database-apps-files-maintenance.md#database-apps-and-files-maintenance). issue was reproduced on a nextcloud snap instance of NC 29.04, but the symptoms were identical. Database blowing up after ‘preview generator app’ tried to generate previews over ‘external files’. Cleaning up the mess afterwards was like open heart surgery… but successful.

After uninstalling the ‘preview generator app’, remove the directory `.../data/appdata_occredxxxx/preview/`, rescan files and rescan app data, which should clear oc\_filecache on database, finally remove ‘undo’ history (`temp_undo_00x.ibu`). This will shrink database and free disk space… the above freed in excess of 30 GiB.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 16, 2025, 9:10am UTC](https://help.nextcloud.com/t/nextcloud-creating-never-ending-mysql-threads/157752/5 "2025-01-16T09:10:47Z")

</div>


