Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Cache] The cache does not work with a NFS filesystem  #33392

Copy link
Copy link
Closed
@maidmaid

Description

@maidmaid
Issue body actions

Symfony version(s) affected: 4.2.10

Description
The cache component desn't work with a NFS filesystem because of the flock() function calls done by the LockRegistry :

if (flock($lock, LOCK_EX | LOCK_NB)) {

Indeed, the flock() function itself is not reliable with a such filesystem.

How to reproduce

php -r "var_dump(flock(fopen('/file-on-nfs-filesystem', 'r+'), LOCK_EX | LOCK_NB));"
// always returns bool(false)

Possible Solution

We could bypass the locking mechanism if we know we are on a NFS filesystem.

Additional context

I tried to use the cache component into a vagrant with NFS synchronised files but I can't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.