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

Moved opcache clearing to before bootWorker #547

Merged
merged 1 commit into from
Jun 27, 2022
Merged

Moved opcache clearing to before bootWorker #547

merged 1 commit into from
Jun 27, 2022

Conversation

LauJosefsen
Copy link
Contributor

@LauJosefsen LauJosefsen commented Jun 25, 2022

Moved opcached clearing to before bootWorker method to enable hot reloading for Swoole and OpenSwoole when Opcache is enabled.

More information about the issue this solves can be seen in #546 .

Closes #546

@michael-rubel
Copy link

Looks like it's related to this issue: #432

@LauJosefsen
Copy link
Contributor Author

Looks like it's related to this issue: #432

It sure does seem like that. Also the issues linked from that issue. (funny how i didn't find those by searching for issues with "--watch" 🤔)

I believe the change I propose is both safe and fixes the issue completely.

@taylorotwell taylorotwell merged commit a746fd5 into laravel:1.x Jun 27, 2022
@binaryfire
Copy link

binaryfire commented Nov 5, 2023

Sorry to bump an old thread, but is anyone still having this issue? I'm using Swoole and reloading workers (either automatically via --watch / Chokidar or manually via php artisan octane:reload) doesn't reflect certain changes. The only way to get it fully working is via php artisan octane:stop.

If anyone has a workaround they could share it would be much appreciated. I'm using Docker but I don't think that should make a difference, since everything is run in the container.

@LauJosefsen
Copy link
Contributor Author

@binaryfire Are you using file opcache by chance? Maybe link your php.ini file? We do not have any problems anymore, also using Swoole on our deployments.

@binaryfire
Copy link

@LauJosefsen Hi Lau, thanks for the reply. Yeah I'm using opcache. Here's the link to the PHP config I'm using in the container: https://gist.github.com/binaryfire/ed1ec34f8333117aa7e494192f807aa2

It's identical to Sail: PHP 8.2 from the Ondrej PPA on Ubuntu 22.04, stock php.ini with the same custom config in conf.d folder. Not sure what's going on! I've considered implementing a custom listener or file watcher to fully stop and start Octane on file changes, but I'm hoping there's a more elegant solution.

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 this pull request may close these issues.

Opcache is not cleared before worker (re)boot
4 participants