Intermittent "The request timed out" on local network with Mac as server

I have a MacBook Pro that I'm using to develop an iOS app, and during development I have the app setup to connect to the mac's local ipv4 address instead of my production server address. However, multiple times a day I get the "The request timed out" error on my app (iPhone), and it persists for a few minutes. Then all of a sudden it will start working again, until it happens again, sometimes even 15 minutes later.

During that "down" time I can still connect to to any other server from the phone, and I believe (it's been at least a year at this point) I have successfully sent some http requests to my Mac's ip from another local machine.

I'm running XCode 14.2 (14C18), iOS 16.3.1 (app target at 16.0). The development machine is a MacBook Pro 13" (2017) with macOS Ventura 13.2.1, and I run the 3 services I need (httpd, mysql, php) through Brew (it was a while ago, but I believe I used Brew because I couldn't get it to work with the native installations).

For what it's worth though, this issue has been happening on older macOS, iOS, and Xcode versions.

Any ideas or pointers?

Intermittent "The request timed out" on local network with Mac as server
 
 
Q