Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opcache is not cleared before worker (re)boot #546

Closed
LauJosefsen opened this issue Jun 25, 2022 · 2 comments · Fixed by #547
Closed

Opcache is not cleared before worker (re)boot #546

LauJosefsen opened this issue Jun 25, 2022 · 2 comments · Fixed by #547

Comments

@LauJosefsen
Copy link
Contributor

LauJosefsen commented Jun 25, 2022

  • Octane Version: v1.2.12
  • Laravel Version: v9.3.1
  • PHP Version: 8.1.0
  • Server & Version: OpenSwoole 4.11 and also Swoole 4.8.10 (Using their official docker dev-images respectively)
  • Database Driver & Version: Not relevant

Description:

The opcache is not cleared before the worker boot, resulting in hot reload not working with all bootstrapped content using at least Swoole and OpenSwoole. (tested with both)

The solution is very simple, and is simply a re-ordering of the boot sequence of a worker, moving the clearOpcodeCache() method call before the $this->bootWorker() method call fixes the issue on my setup.

Steps To Reproduce:

  1. Enable opcache in php.ini: opcache.enable_cli=1
  2. With the server running in --watch mode, edit any bootstrapped file, for example a routes file.
  3. Observe hot reloading is not having any effect on bootstrapped files, for example that routes do not change untill server restart.
@driesvints
Copy link
Member

Looks like you sent in a PR so let's see how that goes. Thanks

@DanjBethel
Copy link

I think this may be happening again. Can anyone else confirm ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants