When I try to open nextcloud url I get the error saying "File entry could not be inserted but could also not be selected with getId() in order to perform an update. Please try again.","Code":0,"Trace":

Support intro

{"reqId":"46F3r9UgcN4nO8iWZibe","level":3,"time":"2020-12-06T21:53:54+00:00","remoteAddr":"192.168.0.18","user":"skumar","app":"index","method":"GET","url":"/nextcloud/index.php/apps/dashboard/","message":{"Exception":"RuntimeException","Message":"File entry could not be inserted but could also not be selected with getId() in order to perform an update. Please try again.","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php","line":131,"function":"insert","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php","line":131,"function":"insert","class":"OC\\Files\\Cache\\Wrapper\\CacheWrapper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php","line":294,"function":"insert","class":"OC\\Files\\Cache\\Wrapper\\CacheWrapper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php","line":224,"function":"addToCache","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Cache/LocalRootScanner.php","line":32,"function":"scanFile","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php","line":338,"function":"scanFile","class":"OC\\Files\\Cache\\LocalRootScanner","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Cache/LocalRootScanner.php","line":40,"function":"scan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/View.php","line":1339,"function":"scan","class":"OC\\Files\\Cache\\LocalRootScanner","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/View.php","line":1383,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Node/Node.php","line":100,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Node/Node.php","line":187,"function":"getFileInfo","class":"OC\\Files\\Node\\Node","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Preview/Watcher.php","line":65,"function":"getId","class":"OC\\Files\\Node\\Node","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Preview/Watcher.php","line":55,"function":"deleteNode","class":"OC\\Preview\\Watcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Preview/WatcherConnector.php","line":64,"function":"postWrite","class":"OC\\Preview\\Watcher","type":"->"},{"function":"OC\\Preview\\{closure}","class":"OC\\Preview\\WatcherConnector","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/Hooks/EmitterTrait.php","line":101,"function":"call_user_func_array"},{"file":"/var/www/html/nextcloud/lib/private/Hooks/PublicEmitter.php","line":40,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Node/Root.php","line":139,"function":"emit","class":"OC\\Hooks\\PublicEmitter","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Node/Node.php","line":117,"function":"emit","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Node/Folder.php","line":197,"function":"sendHooks","class":"OC

Nextcloud version : 20.1.1
Operating system and version: Ubuntu 18.04
Apache or nginx version: Apache/2.4.29 (Ubuntu)
PHP version : 7.4

please help

This issue got fixed itself but db access has gone very slow.