Skip to content

Intermittent file exists error when caching is enabled #34

@deepthykpradeep

Description

@deepthykpradeep

Issue Summary:

We’re intermittently encountering the following error in our Laravel 10 (PHP 8.2) application:

Uncaught exception {"exception":"[object] (ErrorException(code: 0): file_put_contents(xyz/project/storage/framework/cache/data/e5/98/e598f8ae99c7bb379072e9c356bcdb3d05b99f9d): Failed to open stream: File exists at xyz/project/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:204)"}

Context:

  • Cache is set to use the file driver with a 30-minute expiry.
  • The application is containerized and deployed in an environment that automatically scales based on incoming requests.
  • This error occurs intermittently across multiple API endpoints, not tied to a specific one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions