Volt Version
1.7.1
Laravel Version
12.10.2
PHP Version
8.4.7
Database Driver & Version
No response
Description
This issue is specifically about this line in Volt. It would be nice if it can be avoided in productive environments:
|
opcache_invalidate($path, true); |
This was first raised in the FrankenPHP Repo, where @robsontenorio noticed that when stress testing, the application would end up in a memory corruption after a while.
This happens due to opcache_invalidate() being called each request leading to a buildup in memory that eventually leads to an opcache_reset().
opcache_reset() is currently not really safe under concurrency (both in FPM and FrankenPHP, so I'd recommend avoiding an opcache_reset if possible in production environments.
Also when testing with the reproducer, I noticed that the path passed to opcache_invalidate was that of a Blade file (which makes it look unitended)
Steps To Reproduce
You can use the reproducer provided by @robsontenorio https://github.com/robsontenorio/paper.mary-ui.com/tree/franken-bug
It will take a while for the corruption to appear, using postgres/mysql instead of sqlite will make it happen faster.
Volt Version
1.7.1
Laravel Version
12.10.2
PHP Version
8.4.7
Database Driver & Version
No response
Description
This issue is specifically about this line in Volt. It would be nice if it can be avoided in productive environments:
volt/src/ComponentFactory.php
Line 35 in 0ab9d34
This was first raised in the FrankenPHP Repo, where @robsontenorio noticed that when stress testing, the application would end up in a memory corruption after a while.
This happens due to
opcache_invalidate()being called each request leading to a buildup in memory that eventually leads to anopcache_reset().opcache_reset()is currently not really safe under concurrency (both in FPM and FrankenPHP, so I'd recommend avoiding anopcache_resetif possible in production environments.Also when testing with the reproducer, I noticed that the path passed to
opcache_invalidatewas that of a Blade file (which makes it look unitended)Steps To Reproduce
You can use the reproducer provided by @robsontenorio https://github.com/robsontenorio/paper.mary-ui.com/tree/franken-bug
It will take a while for the corruption to appear, using postgres/mysql instead of sqlite will make it happen faster.