Hot reloading taking 5-10 seconds each time

Saved me a few hours this week! Thanks for your help!

I have a very similar issue except it takes about 10 sec to load my local .test site
as @swalkinshaw pointed out I had test file in /etc/resolver/ . I deleted it but this didn’t fix the problem. I do have some errors when ‘trellis vm start’ but not sure that they are critical as the vm starts and my local site gets served (with about 10 sec delay for each request). I would appreciate any pointers to move forward

Thank you

trellis vm start

Alexis-MacBook-Pro-2:trellis AY$ trellis vm start
Running command => limactl start ezlendr.com
INFO[0000] Using the existing instance "ezlendr.com"
WARN[0000] Ignoring: vmType vz: [OS]
INFO[0000] [hostagent] Starting VZ (hint: to watch the boot progress, see "/Users/AY/.lima/ezlendr.com/serial*.log")
INFO[0000] [hostagent] new connection from  to
INFO[0001] SSH Local Port: 49513
INFO[0001] [hostagent] Waiting for the essential requirement 1 of 3: "ssh"
INFO[0001] [hostagent] [VZ] - vm state change: running
INFO[0011] [hostagent] Waiting for the essential requirement 1 of 3: "ssh"
INFO[0011] [hostagent] 2023/09/21 13:04:13 tcpproxy: for incoming conn 127.0.0.1:49529, error dialing "192.168.5.15:22": connect tcp 192.168.5.15:22: connection was refused
ERRO[0016] [hostagent] r.CreateEndpoint() = no route to host
ERRO[0017] [hostagent] r.CreateEndpoint() = no route to host
ERRO[0017] [hostagent] r.CreateEndpoint() = no route to host
ERRO[0019] [hostagent] r.CreateEndpoint() = no route to host
INFO[0021] [hostagent] Waiting for the essential requirement 1 of 3: "ssh"
INFO[0022] [hostagent] The essential requirement 1 of 3 is satisfied
INFO[0022] [hostagent] Waiting for the essential requirement 2 of 3: "user session is ready for ssh"
INFO[0022] [hostagent] The essential requirement 2 of 3 is satisfied
INFO[0022] [hostagent] Waiting for the essential requirement 3 of 3: "the guest agent to be running"
INFO[0022] [hostagent] The essential requirement 3 of 3 is satisfied
INFO[0022] [hostagent] Waiting for the final requirement 1 of 1: "boot scripts must have finished"
INFO[0022] [hostagent] Forwarding "/run/lima-guestagent.sock" (guest) to "/Users/AY/.lima/ezlendr.com/ga.sock" (host)
INFO[0022] [hostagent] The final requirement 1 of 1 is satisfied
INFO[0022] READY. Run `limactl shell ezlendr.com` to open the shell.

Updating /etc/hosts file (sudo may be required, see `trellis vm sudoers` for more details)

Your Trellis VM is ready to use!

* Composer and WP-CLI commands need to be run on the virtual machine for any post-provision modifications.
* You can SSH into the machine with 'trellis vm shell'
* Then navigate to your WordPress sites at '/srv/www'

lsof -n -i -P | grep LISTEN

rapportd   550   AY    3u  IPv4 0x110b471f8a2abb7d      0t0  TCP *:49179 (LISTEN)
rapportd   550   AY    4u  IPv6 0x110b471127887ed5      0t0  TCP *:49179 (LISTEN)
GitHub     828   AY   27u  IPv4 0x110b471f8a2b0efd      0t0  TCP 127.0.0.1:49310 (LISTEN)
bridge    1062   AY   12u  IPv4 0x110b471f855218bd      0t0  TCP 127.0.0.1:49433 (LISTEN)
bridge    1062   AY   23u  IPv4 0x110b471f862158bd      0t0  TCP 127.0.0.1:1143 (LISTEN)
bridge    1062   AY   24u  IPv4 0x110b471f8620fa1d      0t0  TCP 127.0.0.1:1025 (LISTEN)
limactl   1172   AY   10u  IPv4 0x110b471f8620bcdd      0t0  TCP 127.0.0.1:49514 (LISTEN)
limactl   1172   AY   22u  IPv4 0x110b471f86206efd      0t0  TCP 127.0.0.1:49513 (LISTEN)
limactl   1172   AY   45u  IPv4 0x110b471f861ffa1d      0t0  TCP *:80 (LISTEN)
ssh       1210   AY    7u  IPv4 0x110b471f870bdefd      0t0  TCP 127.0.0.1:11211 (LISTEN)
ssh       1210   AY   10u  IPv4 0x110b471f870c005d      0t0  TCP 127.0.0.1:8025 (LISTEN)
ssh       1210   AY   14u  IPv4 0x110b471f870b3cdd      0t0  TCP 127.0.0.1:3306 (LISTEN)

scutil --dns

DNS configuration

resolver #1
  nameserver[0] : 23.252.205.6
  nameserver[1] : 23.252.205.7
  nameserver[2] : 24.238.0.53
  nameserver[3] : 8.8.8.8
  if_index : 5 (en0)
  flags    : Request A records, Request AAAA records
  reach    : 0x00000002 (Reachable)

resolver #2
  domain   : local
  options  : mdns
  timeout  : 5
  flags    : Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)
  order    : 300000

resolver #3
  domain   : 254.169.in-addr.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)
  order    : 300200

resolver #4
  domain   : 8.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)
  order    : 300400

resolver #5
  domain   : 9.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)
  order    : 300600

resolver #6
  domain   : a.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)
  order    : 300800

resolver #7
  domain   : b.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)
  order    : 301000

DNS configuration (for scoped queries)

resolver #1
  nameserver[0] : 23.252.205.6
  nameserver[1] : 23.252.205.7
  nameserver[2] : 24.238.0.53
  nameserver[3] : 8.8.8.8
  if_index : 5 (en0)
  flags    : Scoped, Request A records, Request AAAA records
  reach    : 0x00000002 (Reachable)

Were you able to solve your issue? I am having similar problems with Lima taking about 10 sec where my production server is functioning normally.

After resolving the issues above with @swalkinshaw 's help, the next main problem was just that developing locally on my laptop was slow in general. Production servers were all fine, because they just had more power. I’m trying some remote dev server approaches at the moment, which are working ok.