It seems the nginx changed its round robin's peer structure, can you also change this line:

     if (now - peer->checked > peer->fail_timeout) {