Error: More than 1000 expressions in a list ... on Oracle

Sometimes I can see the following error within the log file:

{“reqId”:“rIAHGLPbsE2Lll2yEi81”,“level”:3,“time”:“2021-04-08T16:36:51+02:00”,“remoteAddr”:“x.x.x.x”,“user”:“username”,“app”:“core”,“method”:“PROPFIND”,“url”:"/remote.php/webdav/Handy/Fotos/",“message”:{“Exception”:“Doctrine\DBAL\Query\QueryException”,“Message”:“More than 1000 expressions in a list are not allowed on Oracle.”,“Code”:0,“Trace”:[{“file”:"/var/www/nextcloud/lib/private/Comments/Manager.php",“line”:657,“function”:“execute”,“class”:“OC\DB\QueryBuilder\QueryBuilder”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php",“line”:89,“function”:“getNumberOfUnreadCommentsForObjects”,“class”:“OC\Comments\Manager”,“type”:"->",“args”:[“files”,[“32299”,“32298”,“32303”,“32451”,“32452”,“And 1430 more entries, set log level to debug to see all entries”],{“class”:“OC\User\User”}]},{“file”:"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php",“line”:117,“function”:“cacheDirectory”,“class”:“OCA\DAV\Connector\Sabre\CommentPropertiesPlugin”,“type”:"->",“args”:[{“class”:“OCA\DAV\Connector\Sabre\Directory”}]},{“file”:"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",“line”:89,“function”:“handleGetProperties”,“class”:“OCA\DAV\Connector\Sabre\CommentPropertiesPlugin”,“type”:"->",“args”:[{“class”:“Sabre\DAV\PropFind”},{“class”:“OCA\DAV\Connector\Sabre\Directory”}]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:1052,“function”:“emit”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[“propFind”,[{“class”:“Sabre\DAV\PropFind”},{“class”:“OCA\DAV\Connector\Sabre\Directory”}]]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:984,“function”:“getPropertiesByNode”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[{“class”:“Sabre\DAV\PropFind”},{“class”:“OCA\DAV\Connector\Sabre\Directory”}]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:1661,“function”:“getPropertiesIteratorForPath”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[“Handy/Fotos”,["{http://owncloud.org/ns}owner-id","{DAV:}creationdate","{DAV:}getetag","{http://owncloud.org/ns}permissions","{DAV:}getlastmodified",“And 15 more entries, set log level to debug to see all entries”],1]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:1646,“function”:“writeMultiStatus”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[{“elementMap”:[],“contextUri”:"/remote.php/webdav/",“namespaceMap”:{“DAV:”:“d”,“http://sabredav.org/ns":“s”,“http://owncloud.org/ns”:“oc”,“http://nextcloud.org/ns”:“nc”},“classMap”:[],"class”:“Sabre\Xml\Writer”},{“class”:“Generator”},false]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",“line”:346,“function”:“generateMultiStatus”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[{“class”:“Generator”},false]},{“file”:"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",“line”:89,“function”:“httpPropFind”,“class”:“Sabre\DAV\CorePlugin”,“type”:"->",“args”:[{“class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:472,“function”:“emit”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[“method:PROPFIND”,[{“class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:253,“function”:“invokeMethod”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[{“class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:321,“function”:“start”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php",“line”:84,“function”:“exec”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/remote.php",“line”:167,“args”:["/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php"],“function”:“require_once”}],“File”:"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",“Line”:267,“CustomMessage”:“More than 1000 expressions in a list are not allowed on Oracle.”},“userAgent”:“Mozilla/5.0 (Android) Nextcloud-android/3.15.1”,“version”:“21.0.0.18”,“id”:“606f452abe056”}

Nextcloud version (eg, 20.0.5): 21.0.0.18
Operating system and version (eg, Ubuntu 20.04): DEBIAN 10 (buster)
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38 (Debian)
PHP version (eg, 7.4): 7.3

same?

Yes, the message itself seems the same. But the stack shows different modules as I can see.

I do not see it in the version 21.0.1

OK, Version 21.0.1 was now available at my nextcloud and was updated successfully.
I’ll check the logs if the error still exists.

Thank you!

It seems, that the error is solved with version 21.0.1.1.

Thank you!

I got Nextcloud 21.0.1 and getting this error im not use if its exactly the same

I submit a ticket

Hello AndyXheli,

thank you!

Yes, also in my installation 21.0.1.1 the error occurs again.

Can you publish here, if you get any information about it?

Thank you!

You’re Welcome! Yes i can update this post once i get more info on it.

For me it is back in 21.0.1.1 also :frowning:

It is gone in 21.0.2

Doctrine\DBAL\Query\QueryException: More than 1000 expressions in a list are not allowed on Oracle.

Still in NC 21.0.2

which APP?

Same here:
NC 21.0.2

{“reqId”:“9lbmUvoPriDcvybZNfZQ”,“level”:3,“time”:“2021-06-06T05:27:55+00:00”,“remoteAddr”:“91.60.104.175”,“user”:“ncp”,“app”:“core”,“method”:“POST”,“url”:"/index.php/apps/mail/api/mailboxes/45/sync",“message”:{“Exception”:“Doctrine\DBAL\Query\QueryException”,“Message”:“More than 1000 expressions in a list are not allowed on Oracle.”,“Code”:0,“Trace”:[{“file”:"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",“line”:323,“function”:“execute”,“class”:“OC\DB\QueryBuilder\QueryBuilder”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/mail/lib/Db/MessageMapper.php",“line”:592,“function”:“findEntities”,“class”:“OCP\AppFramework\Db\QBMapper”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/mail/lib/Service/Sync/SyncService.php",“line”:156,“function”:“findIdsByQuery”,“class”:“OCA\Mail\Db\MessageMapper”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/mail/lib/Service/Sync/SyncService.php",“line”:126,“function”:“getDatabaseSyncChanges”,“class”:“OCA\Mail\Service\Sync\SyncService”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/mail/lib/Controller/MailboxesController.php",“line”:161,“function”:“syncMailbox”,“class”:“OCA\Mail\Service\Sync\SyncService”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:218,“function”:“sync”,“class”:“OCA\Mail\Controller\MailboxesController”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:127,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/AppFramework/App.php",“line”:157,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Route/Router.php",“line”:302,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::"},{“file”:"/var/www/nextcloud/lib/base.php",“line”:993,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->"},{“file”:"/var/www/nextcloud/index.php",“line”:37,“function”:“handleRequest”,“class”:“OC”,“type”:"::"}],“File”:"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",“Line”:268,“CustomMessage”:“More than 1000 expressions in a list are not allowed on Oracle.”},“userAgent”:“Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0”,“version”:“21.0.2.1”,“id”:“60bc671e82918”}

Error core Doctrine\DBAL\Query\QueryException: More than 1000 expressions in a list are not allowed on Oracle.

/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 323:

OC\DB\QueryBuilder\QueryBuilder->execute()

/var/www/nextcloud/apps/mail/lib/Db/MessageMapper.php - line 592:

OCP\AppFramework\Db\QBMapper->findEntities()

/var/www/nextcloud/apps/mail/lib/Service/Sync/SyncService.php - line 156:

OCA\Mail\Db\MessageMapper->findIdsByQuery()

/var/www/nextcloud/apps/mail/lib/Service/Sync/SyncService.php - line 126:

OCA\Mail\Service\Sync\SyncService->getDatabaseSyncChanges()

/var/www/nextcloud/apps/mail/lib/Controller/MailboxesController.php - line 161:

OCA\Mail\Service\Sync\SyncService->syncMailbox()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 218:

OCA\Mail\Controller\MailboxesController->sync()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 127:

OC\AppFramework\Http\Dispatcher->executeController()

/var/www/nextcloud/lib/private/AppFramework/App.php - line 157:

OC\AppFramework\Http\Dispatcher->dispatch()

/var/www/nextcloud/lib/private/Route/Router.php - line 302:

OC\AppFramework\App::main()

/var/www/nextcloud/lib/base.php - line 993:

OC\Route\Router->match()

/var/www/nextcloud/index.php - line 37:

OC::handleRequest()

Same with NC 21.0.3 (apparently because of some tag search from recognize app) :

Doctrine\DBAL\Query\QueryException: More than 1000 expressions in a list are not allowed on Oracle.

/var/www/nextcloud/lib/private/SystemTag/SystemTagObjectMapper.php - line 91:

OC\DB\QueryBuilder\QueryBuilder->execute()

/var/www/nextcloud/apps/recognize/lib/Service/TagManager.php - line 64:

OC\SystemTag\SystemTagObjectMapper->getTagIdsForObjects([ "21871","2 ... "], "files")

/var/www/nextcloud/apps/recognize/lib/Controller/AdminController.php - line 33:

OCA\Recognize\Service\TagManager->findMissedClassifications()