Just an update. I have noticed that this problem seems to show up during periods of inactivity. I have added this line:
ping -i 60 google.com &
to the startup script. I don’t know if it will solve the problem, but I will continue to post updates here, in the hope that it will be helpful to others.