My webserver (hosting a facebook app with nginx) started receiving errors saying
*907768 FastCGI sent in stderr: "Invalid IPv6 configuration on server, Please disable or get native IPv6 on your server" while reading response header from upstream, client:...
What could be the cause of this error? I don’t always get this.
The error comes from php code, more specifically – facebook sdk. It is thrown when facebook code tries to connect to an ipv6 address and fails to reach a network, most likely due to ipv6 enabled in system but no ipv6 connectivity (quote from base_facebook.php):
Correct way to handle this would be to either disable ipv6 in system or obtain some ipv6 connectivity. Alternatively it should be possible to suppress the error by asking facebook code to always use ipv4 by something like this in your code: