Clean Up Old PHP Instances / Assigned Ports
sghoweri opened this issue · 1 comments
I started to run into this issue a couple of days ago where local Jest tests using the Twig Renderer randomly started to hang before eventually crashing my entire computer.
After this happened 5+ times, I did some digging and think I've found the problem + came up with a fix...
Essentially the problem was that getPort
couldn't find any "available, previously unused" ports because old PHP instances (the port previously assigned) aren't cleared out of the cache that gets created and saved locally.
Fix coming soon!
@sghoweri, @EvanLovely I recently ran into this same issue. My tests started hanging after running a ton of local Jest tests.
With help from @sghoweri, I got Jest tests running again by adding this.configStore.clear();
immediately after line 38 of twig-renderer.js
, clearing out all the previously used ports.
Note that I am on v0.13.0
. It looks like newer versions of twig-renderer
do not use the conf
package to store the config, and may or may not have this issue.