This sends around 5 requests per second to the server. I need to send around 40 requests per second. The server does not limit my requests (I have run 10 instances of this Python script and it has worked) and my internet does not limit the requests.
It's my code which limits my requests per second.
Is it possible to make my Python script send more requests?
I agree with @anekix, using twisted is the best way to do it.
You need to know one thing, which ever method you use to 10000 HTTP request, there is open file descriptor limit, which is basically set to 1000 in Linux.
What this mean is that you can have only 1000 concurrent TCP connections. However you can increase this from configurations /etc/security/limits.conf in Linux
What is the fastest way to send 10,000 HTTP requests in Python 2.7?