laravel / telescope

An elegant debug assistant for the Laravel framework.
https://laravel.com/docs/telescope
MIT License
4.88k stars 582 forks source link

Memory Leak with Octane #1071

Closed tm1000 closed 3 years ago

tm1000 commented 3 years ago

Description:

When Telescope is enabled in AppServiceProvider (following: https://laravel.com/docs/8.x/telescope#local-only-installation) as follows:

        if ($this->app->environment('local')) {
            $this->app->register(
                \Laravel\Telescope\TelescopeServiceProvider::class
            );
            $this->app->register(TelescopeServiceProvider::class);
        }

The memory output from Octane slowly increases over time:

200    GET / .............................................. 19.89 mb 35.50 ms
  200    GET / ............................................... 19.99 mb 4.15 ms
  200    GET / ............................................... 20.00 mb 4.37 ms
  200    GET / ............................................... 20.00 mb 4.31 ms
  200    GET / ............................................... 20.01 mb 4.20 ms
  200    GET / ............................................... 20.01 mb 4.39 ms
  200    GET / ............................................... 20.02 mb 4.14 ms
  200    GET / ............................................... 20.02 mb 4.45 ms
  200    GET / ............................................... 20.03 mb 4.20 ms
  200    GET / ............................................... 20.03 mb 4.22 ms
  200    GET / ............................................... 20.04 mb 4.09 ms
  200    GET / ............................................... 20.04 mb 4.15 ms
  200    GET / ............................................... 20.05 mb 4.48 ms
  200    GET / ............................................... 20.05 mb 4.33 ms

Once telescope is disabled in (removed) from AppServiceProvider then Octane's memory seems stable

 200    GET / .............................................. 17.39 mb 13.00 ms
  200    GET / ............................................... 17.49 mb 2.42 ms
  200    GET / ............................................... 17.49 mb 2.48 ms
  200    GET / ............................................... 17.49 mb 2.48 ms
  200    GET / ............................................... 17.49 mb 2.59 ms
  200    GET / ............................................... 17.49 mb 2.52 ms
  200    GET / ............................................... 17.49 mb 2.49 ms
  200    GET / ............................................... 17.49 mb 2.48 ms
  200    GET / ............................................... 17.49 mb 2.38 ms
  200    GET / ............................................... 17.49 mb 2.47 ms
  200    GET / ............................................... 17.49 mb 2.59 ms
  200    GET / ............................................... 17.49 mb 2.48 ms

This might not be an issue if it's chalked up to "well in development memory is irrelevant and you should only be running telescope in development". I'm fine if that's the answer but I still think it should be brought up or looked into

themsaid commented 3 years ago

The leak is in facade/ignition. Fixed https://github.com/facade/ignition/pull/393