Memory leak inside NamespacedItemResolver::parsed()
cache when Octane is used
#415
Labels
NamespacedItemResolver::parsed()
cache when Octane is used
#415
Description:
There are some caching mechanism inside
\Illuminate\Support\NamespacedItemResolver::parseKey()
method.But this cache is never flushed when running Laravel Octane. This leads to some memory leak when many validation errors are being processed. It’s pretty easy to distinguish when attribute values are big enough.
Steps To Reproduce:
Using fresh install of Laravel Octane, you do something like this:
Inside logs you can see that memory usage increases with every request:
I did some performance testing without this cache, and I haven't seen any improvement, only within a margin of error.
Maybe we can consider deleting this caching to not overthink this issue?
The text was updated successfully, but these errors were encountered: