In an environment comprised of eZ Publish 4.7 (fully patched) with ezoracle + Oracle DB, and set up in DFS cluster mode, it is necessary to kill database processes regularly because they are locked exceeding 900 seconds. The issue seems to be a consequence of the fact that "*.generating" files, which are temporary in nature, are in fact accumulating in the 'ezdfsfile' table when images are uploaded.
There are no relevant errors in the error log, but cluster.log contains many entries like this:
The customer believes this is what is happening:
1) user views page that needs the creation of an image alias
https://github.com/ezsystems/ezpublish-legacy/blob/master/lib/ezimage/classes/ezimagemanager.php line 866
$convertHandler = eZClusterFileHandler::instance( $sourceMimeData['url'] );
$ret = self::$dbbackend->_startCacheGeneration( $this->filePath, $generatingFilePath );
if the database is having a problem for some reason and throws an non-standard error code, we end up here
// @todo Make this an actual error, maybe an exception
return array( 'result' => 'error' );
--as you can see from the comment, it looks like this code was never properly finished!
When that array is returned to the calling function, we end up here
https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/private/classes/clusterfilehandlers/ezdfsfilehandler.php line 1307
// unhandled error case, should not happen
Which puts us here
// we were not granted file generation (someone else is doing it)
// we wait for max. $remainingGenerationTime and check if the
// file has been generated in between
// Actually, we have no clue if the generated file was the one we were
// looking for, and it doesn't seem possible to RELOAD the alias list.
// We don't even know what attribute we're using... CRAP
Further analysis has revealed that the Oracle DB issues that cause the problem in the first place are related with deadlocks (error 60). The error thrown by Oracle in https://github.com/ezsystems/ezoracle/blob/master/clusterfilehandlers/dfsbackends/oracle.php that causes the infinite loop (serialized in the variable $this->error from line 1495) is this: