Proxy Connection Problems
If you're having trouble connecting to a proxy server, please read the following questions & answers...
Are you behind a firewall?
Some hosting providers will block outgoing access to port 31280. Check with your hosting provider to find out if this is the case for you.
Are you getting Connection Refused from AWS/EC?
You probably need to explicitly enable outgoing access to port 31280 in your EC2 firewall/networking configuration.
Did you get a bunch of
407 response codes? Are you getting
Connection Refused or
Cannot Connect to Proxy?
If you get too many
407 response codes from a proxy, your IP will be temporarily blocked for up to 4 hours, during which time you will get Connection Refused errors. A
402 error indicates that you do not have access to the proxy, and you will need to go to Edit Proxies in your account dashboard to enable access, or use a different proxy. A
407 error indicates an authentication problem. The easiest way to fix this is to Add your IP to ProxyMesh.
Have you gotten a lot of
407 responses when using one proxy specifically?
A large number of
407 request errors from one particular proxy server, while requests through other proxy servers are working correctly, may indicate a configuration issue. We suggest you check on the following points:
- Do you have 2 or more different scripts, and could one of them be misconfigured?
- Have you added your IP address for authentication? If so, please make sure you are not passing in any
username:passwordauthentication headers, which are the most likely cause of the
The easiest way to fix this issue is to Add your IP to ProxyMesh. Then our own Python-based proxy server forwards your requests through a set of rotating squid proxies, which remove any request headers that might compromise your privacy and anonymity. Your actual requests are not changed in the process.
More about the
- Be aware that authorizing an IP's access to the proxy during a 4-hour ban does not immediately lift the ban. You still need to wait until the 4 hours are up.
- ProxyMesh doesn't whitelist customers' IPs; but in effect you are whitelisting when you add an authorized IP. As long as your IPs are authorized beforehand, you should have no problem getting access to the proxies.
Are you getting
If a significant portion of your requests are timing out
response code), there's a few reasons this could happen.
- The network connections between you and the proxy and/or between the proxy and the remote site are unreliable. Try some different proxies and see if that fixes the problem.
- The pages you're requesting take a long time. The proxy server normally waits for 20 seconds, but you can increase that time with the X-ProxyMesh-Timeout custom header.
- The proxy IPs have been blocked by the remote site. If you think this is the case, then you'll want to switch proxies, and ideally use multiple proxies to distribute your requests.
However, if only a small percentage of your requests are getting
408 response code, then the best thing to do is to retry your requests up to 3 times, ideally with a short delay of at least 1 second between retries.
Are You Attempting a Persistent Connection?
Although HTTP, the protocol supported by ProxyMesh, can use both persistent and nonpersistent connections, the proxy service is not designed for persistent connections. That is, a proxy connection normally closes after transmission of just one request and one response. The proxy service may detect and disable a keep-alive header included in a request.