Skip to content

Cache write errors with Laravel Octane #203

@atymic

Description

@atymic

Hi,

We're running the Purifier fine normally, but after trying octane we started receiving lots of errors related to the cache directory not being writeable.

I'm not sure exactly what is causing this, thought I suspect what is happening is that every single new request is creating a cache file on the disk, and this is causing our lambda (limited to 250mb storage) to run out of space.

I will attempt to reproduce and debug further, curious if anyone else has run into similar issues.

Edit: To clarify, it initially works fine then errors out later.

ErrorException: Directory /var/task/storage/app/purifier not writable. 
#101 /vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php(295): Illuminate\Foundation\Bootstrap\HandleExceptions::handleError
#100 /vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\Foundation\Bootstrap\HandleExceptions::{closure:Illuminate\Foundation\Bootstrap\HandleExceptions::forwardsTo():255}
#99 [internal](0): trigger_error
#98 /vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php(295): HTMLPurifier_DefinitionCache_Serializer::_testPermissions
#97 /vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php(238): HTMLPurifier_DefinitionCache_Serializer::_prepareDir
#96 /vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php(125): HTMLPurifier_DefinitionCache_Serializer::cleanup
#95 /vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php(108): HTMLPurifier_DefinitionCache_Decorator::cleanup
#94 /vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php(72): HTMLPurifier_DefinitionCache_Decorator_Cleanup::get
#93 /vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php(579): HTMLPurifier_Config::getDefinition
#92 /vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php(654): HTMLPurifier_Config::maybeGetRawHTMLDefinition
#91 /vendor/mews/purifier/src/Purifier.php(103): Mews\Purifier\Purifier::addCustomDefinition
#90 /vendor/mews/purifier/src/Purifier.php(240): Mews\Purifier\Purifier::getConfig
#89 /vendor/mews/purifier/src/Purifier.php(71): Mews\Purifier\Purifier::setUp
#88 /vendor/mews/purifier/src/Purifier.php(54): Mews\Purifier\Purifier::__construct
#87 /vendor/mews/purifier/src/PurifierServiceProvider.php(51): Mews\Purifier\PurifierServiceProvider::{closure:Mews\Purifier\PurifierServiceProvider::register():50}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions