Random PHP error after moving files around, what does it mean?

I’ve been seeing this message when moving stuff around recently, I can’t make sense of it. Anyone able to sanitise and relay back to me what the issue may be please?

"app":"PHP","message":"Uncaught Error: Access to undeclared static property: OC\\Files\\Filesystem::$normalizedPathCache in \/var\/www\/html\/lib\/private\/Files\/Filesystem.php:773\nStack trace:\n#0 \/var\/www\/html\/lib\/private\/Files\/View.php(2034): OC\\Files\\Filesystem::normalizePath('\/jason\/files\/So...')\n#1 \/var\/www\/html\/lib\/private\/Files\/View.php(1152): OC\\Files\\View->unlockFile('\/Software\/Nextc...', 1)\n#2 [internal function]: OC\\Files\\View->OC\\Files\\{closure}()\n#3 \/var\/www\/html\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/CallbackWrapper.php(109): call_user_func(Object(Closure))\n#4 [internal function]: Icewind\\Streams\\CallbackWrapper->stream_close()\n#5 {main}\n  thrown at \/var\/www\/html\/lib\/private\/Files\/Filesystem.php#773","level":3,"time":"2016-11-19T23:16:07+00:00","method":"GET","url":"\/apps\/activity\/api\/v2\/activity\/filter?format=json&object_type=files&object_id=68941","user":"jason"}

And unrelated this seems like a DB error which may have happened when I bounced the remote mariaDB, but also maybe not.

app":"no app in context","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`,\\n\\t\\t\\t\\t\\t   `storage_mtime`, `encrypted`, `etag`, `permissions`, `checksum`\\n\\t\\t\\t\\tFROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ?' with params [\\\"1\\\", \\\"e67850b76042cf881eb980d661f35e3b\\\"]:\\n\\nSQLSTATE[HY000]: General error: 2006 MySQL server has gone away\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(116): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/var\\\/www\\\/html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\

Appreciate there’s not much to work with here, but if they can be made sense of (and possibly improved for NC 11.x or 12? That would be awesome :thumbsup:

Can you run tuning-primer.sh or other sql-server-optimization scripts. You can see if you have a large enough cache, enough max_connections, …
Errors could be related, so you have this error every time you move stuff around, or only if it exceeds a certain amount?

The SQL seems random, but the PHP appears to be related to moving files. I’ll try the script.

And if you are not already using redis as file-locking cache, this reduces considerably the load on your sql database during file operations.

I’m already using Redis, as per my guide :slight_smile:

Ok, the script didn’t highlight any issues beyond an index cache. I’ll add that later.

1 Like

OK, now considering it’s related to sharing, as I got a whole bunch of these testing out the Android Chrome issue in my other thread:

Uncaught Error: Access to undeclared static property: OC\Files\Filesystem::$normalizedPathCache in /var/www/html/lib/private/Files/Filesystem.php:773 Stack trace: #0 /var/www/html/lib/private/Files/View.php(2034): OC\Files\Filesystem::normalizePath('/jason/files/Mu...') #1 /var/www/html/lib/private/Files/View.php(1152): OC\Files\View->unlockFile('/Multimedia/Ins...', 1) #2 [internal function]: OC\Files\View->OC\Files\{closure}() #3 /var/www/html/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure)) #4 [internal function]: Icewind\Streams\CallbackWrapper->stream_close() #5 {main} thrown at /var/www/html/lib/private/Files/Filesystem.php#773

There are already bug reports with similar errors:

1 Like

OK, thanks @tflidd. Looks like plenty of people are already working on it.

Not really sure how actively they are following this and if they manage to reproduce this error reliably.