Apify Discord Mirror

Updated 12 months ago

Long waiting time with proxy

At a glance

The community member is using Selenium and Apify proxies to open a webpage, but it's taking almost 2 minutes to do so. The community members suggest that the issue could be related to the proxy, as the site may be waiting for JavaScript scripts to load before building the DOM tree. They note that the issue is not likely a geographic problem since the site is Facebook. The community members recommend checking the load time without a proxy and trying proxies from other countries to see if that resolves the issue.

Hello,
I'm using selenium + apify proxies.
general code idea:

Plain Text
                driver = await create_driver()
                Actor.log.info("Driver created")
                driver.get(url)
                Actor.log.info(f"Opened: {driver.current_url}")


In logs I can see

Plain Text
2024-02-14T10:42:49.648Z INFO  Launching Chrome WebDriver...
2024-02-14T10:42:50.709Z INFO  Driver created
2024-02-14T10:44:48.834Z INFO  Opened: <url>

So it looks like it took almost 2 minutes to open this page.

Why could it be?
M
D
4 comments
How long does it take without a proxy? Have you checked proxies from other countries?

Because one possible reason is that the site is waiting for some time to get the js scripts before it starts building the DOM tree. And if those scripts are blocked, then until that time expires, the DOM won't be built, which means the site won't return a response. This may well take a few minutes.
Here is an example of this behavior when running locally without a proxy
Attachment
image.png
How long does it take without a proxy?
<1s
Have you checked proxies from other countries?
I only have access to free one so far
it's facebook so I guess that's not geo problem
Add a reply
Sign up and join the conversation on Discord