Into specific enviroments with high traffic (and, i.e., file state on NFS storages) it could happen resource is momentarily not available and, when using file state machine, it happens file_get_contents function returns an empty file even if the file is not empty.
ZP-1442 "Retry loop when writing file state machine data to disk", a parametric retry loop is added when reading file state machine data from disk to check if it could be empty.
The loop executes up to 3 attempts with 100ms of sleep each when reading data to disk.
There are 2 hidden configuration parameters to be added into z-push.conf.php for overwriting the default values:
FILE_STATE_ATTEMPTS: number of attempts. If not defined default value is 3
FILE_STATE_SLEEP: ms to sleep between attempts. If not defined default value is 100
ZP-1442 the 2 parameters were
FILE_STATE_WRITE_ATTEMPTS and FILE_STATE_WRITE_SLEEP . These parameters are now shared between file and read retries so thay're going to be globally renamed
Example of z-push.conf.php:
With this patch, in our enviroment, we actually catch up to 40 errors per day avoiding client re-syncs.