Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

HMR and server reload don't work #187

Closed
judgedim opened this issue Apr 9, 2020 · 1 comment · Fixed by #275
Closed

HMR and server reload don't work #187

judgedim opened this issue Apr 9, 2020 · 1 comment · Fixed by #275
Assignees
Labels
kind/bug/possible Something probably isn't working priority/backlog status/wontfix This will not be worked on
Projects

Comments

@judgedim
Copy link

judgedim commented Apr 9, 2020

Describe the bug
The symfony project itself works fine and as expected. But the HRM doesn't work. I have to stop and start the swoole-server every time I change a file. Did I something wrong? The InotifyHRM class is loaded and initialized.

For my opinion problem here
https://github.com/k911/swoole-bundle/blob/develop/src/Server/Runtime/HMR/InotifyHMR.php#L78
because almost all files included (based on my investigation)

Function reload doesn't work too, so I have to do stop-start only.
It uses next code when I'm trying to reload it
https://github.com/k911/swoole-bundle/blob/develop/src/Server/HttpServer.php#L98

I see next logs in var/log/swoole_dev.log

[2020-04-09 15:38:41 $4532.0] INFO Server is reloading all workers now [2020-04-09 15:38:43 *4551.0] WARNING swWorker_reactor_is_empty (ERRNO 9012): worker exit timeout, forced to terminate [2020-04-09 15:38:43 *4552.1] WARNING swWorker_reactor_is_empty (ERRNO 9012): worker exit timeout, forced to terminate

Steps To Reproduce
I created new empty project with only one controller.

Environment (please complete the following information):

  • OS: Ubuntu
  • PHP Version:
  • Swoole Version: 4.4.17
  • Symfony Version:5.0.7
  • Running in docker: No
@judgedim judgedim added kind/bug/possible Something probably isn't working priority/important labels Apr 9, 2020
@k911 k911 added this to Needs triage in Bugs via automation Apr 9, 2020
@k911 k911 moved this from Needs triage to Low priority in Bugs May 3, 2020
@k911 k911 mentioned this issue Jun 24, 2020
9 tasks
@k911 k911 added the status/wontfix This will not be worked on label Jul 14, 2020
@k911
Copy link
Owner

k911 commented Jul 14, 2020

Unfortunately, I have to mark it as wontfix for now, because HMR will probably need some different approach (not only inotify but also fsevents), and probably it would be required to somehow rebuild Symfony DI container to make it work better. I've added this to the docs that HMR probably does not work with running_mode: reactor, I've tested it on Linux and it is working on Alpha feature basis (now also marked in Readme in #275 ). Still this remains as TODO item on Roadmap #4 .

@k911 k911 closed this as completed Jul 14, 2020
Bugs automation moved this from Low priority to Closed Jul 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug/possible Something probably isn't working priority/backlog status/wontfix This will not be worked on
Projects
Bugs
  
Closed
Development

Successfully merging a pull request may close this issue.

2 participants