I\'m trying to update some values from one server to another server with a cron job. I use file_get_contents().
The strange thing is that this fails occasionally. One min
The name lookup appears to fail whilst running within a cron job sometimes. I've only seen it with names in /etc/hosts, but I haven't tested DNS names.
I was seeing it with sending email and SMTP connection timeouts.
I don't know the exact cause, but in my case I got my SMTP code to connect to 127.0.0.1
instead of localhost
and the problem went away.