laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.78k stars 296 forks source link

[BUG]: Octane Server Restarts When Media Files Uploaded. #246

Closed myckhel closed 3 years ago

myckhel commented 3 years ago

Description:

During watch mode and when media files are uploaded, the server restarts and which is an unwanted behaviour.

Screenshot 2021-04-28 at 11 38 12

I have opened this issue several times (https://github.com/laravel/octane/issues/202, https://github.com/laravel/octane/issues/118) and i think this is a bug and the issue should be left opened until its resolved.

Steps To Reproduce:

Add images dir link to filesystem config

// config/filesystem.php
'links' => [
        public_path('storage') => storage_path('app/public'),
        public_path('images') => base_path('images'),
    ],

Link dir to public dir

images dir to public: php artisan storage:link

create/edit/delete file from images dir

OR

modify public/vendor, public/build folders which are frontend generated folders.

kamlesh-php commented 3 years ago

may be we need exclude DIR like https://github.com/laravel/octane/blob/89ae1a619cdc775211dc8c5d0d6efd4d2b72c486/config/octane.php#L170

this have

nunomaduro commented 3 years ago

@myckhel @kamlesh-php Can you try this? https://github.com/laravel/octane/pull/247.

nunomaduro commented 3 years ago

@myckhel Also, please ensure you are running the latest version of Octane.

myckhel commented 3 years ago

well @nunomaduro i have tested the master branch and updated my octane.php but the changes will only apply to dir with 2 levels deep. so 2 levels deep will actually not work for some of us that uses etc: laravel-medialibrary which stores files in 2,3 or more levels deep.

nunomaduro commented 3 years ago

@myckhel That's not true. It's a glob expression that covers all the directories specified recursively.

myckhel commented 3 years ago

@nunomaduro sorry for my bad comment. because my server still reloads when modified linked images dir and that made me taught the expression only covers 2 dir since i have no knowledge in glob expression.

i will try to see why my linked images dir is reloading the server.