It also might be an iptables rule, which is blocking too fast requests (try to sleep() a second before next request to check).