Fatal error with NFS
stevapple opened this issue · comments
YR Chen commented
Describe the bug
When WordPress (more exactly, the wp-content/plugin
directory) is mounted from a remote NFS drive, FlockMutex
will fail to get the file lock, resulting in uncaught exceptions.
To Reproduce
Steps to reproduce the behavior:
- Use NFS for
wp-content/plugin
. - Enable Decalog and Traffic.
- Run
wp log tail
.
Expected behavior
This should work...
Screenshots
Fatal error: Uncaught malkusch\lock\exception\LockAcquireException: Failed to lock the file. in /mnt/wordpress/wp-content/plugins/decalog/includes/libraries/lock/mutex/FlockMutex.php:142
Stack trace:
#0 /mnt/wordpress/wp-content/plugins/decalog/includes/libraries/lock/mutex/FlockMutex.php(123): malkusch\lock\mutex\FlockMutex->acquireNonBlockingLock()
#1 /mnt/wordpress/wp-content/plugins/decalog/includes/libraries/lock/util/Loop.php(99): malkusch\lock\mutex\FlockMutex->malkusch\lock\mutex\{closure}()
#2 /mnt/wordpress/wp-content/plugins/decalog/includes/libraries/lock/mutex/FlockMutex.php(126): malkusch\lock\util\Loop->execute(Object(Closure))
#3 /mnt/wordpress/wp-content/plugins/decalog/includes/libraries/lock/mutex/FlockMutex.php(164): malkusch\lock\mutex\FlockMutex->lockBusy()
#4 /mnt/wordpress/wp-content/plugins/decalog/includes/libraries/lock/mutex/LockMutex.php(43): malkusch\lock\mutex\FlockMutex->lock()
#5 /mnt/wordpress/wp-content/plugins/traffic/includes/features/class-memory.php(171): malkusch\lock\mutex\LockMutex->synchronized(Object(Closure))
#6 /mnt/wordpress/wp-content/plugins/traffic/includes/features/class-memory.php(114): Traffic\Plugin\Feature\Memory::write_records_to_memory()
#7 /mnt/wordpress/wp-includes/class-wp-hook.php(306): Traffic\Plugin\Feature\Memory::write()
#8 /mnt/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#9 /mnt/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#10 /mnt/wordpress/wp-includes/load.php(1144): do_action('shutdown')
#11 [internal function]: shutdown_action_hook()
#12 {main}
thrown in /mnt/wordpress/wp-content/plugins/decalog/includes/libraries/lock/mutex/FlockMutex.php on line 142
Environment (please complete the following information):
- PHP version: 8.1.17
- WordPress 6.2
- Other info: Decalog / NFS
Additional context
flock
on NFS requires writing permission. Change r
to w
should help.