I have a fresh installation of Raspberry OS on a Raspberry Pi 4. Avahi is running and can be queried by other hosts. The problem is that after "some time" (1 minute, sometimes 5) it stops to answer any query. Restarting avahi immediately solves the problem and the Raspberry can be queried again.
The raspberry is connected through Ethernet.
This is my avahi-daemon.conf
[server]
host-name=iot-ns-controller
domain-name=local
use-ipv4=yes
use-ipv6=yes
allow-interfaces=eth0
deny-interfaces=wlan0
ratelimit-interval-usec=1000000
ratelimit-burst=1000
[wide-area]
enable-wide-area=yes
[publish]
publish-hinfo=no
publish-workstation=no
avahi
is up and running. The weird thing is that this seems to happen only when I am querying it from a Mac device.