Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteThere is no single timeout setting that fixes every PhantomJS-through-Grid failure. First identify whether the delay happens while Grid is creating a session, while an established session is idle, or while PhantomJS loads a page resource. Those are different timers owned by different components, so increasing the wrong one can make a test wait longer without fixing it.
There is also a version caveat: PhantomJS’s command-line documentation applies to PhantomJS 2.1.1, and GhostDriver’s Grid setup is legacy integration guidance—not a guarantee of compatibility with every current Selenium Grid and client. Check the versions actually running before adopting the commands below. See the PhantomJS command-line documentation and GhostDriver project documentation.
Identify which timeout you are seeing
Record the exact exception, when it occurs, and elapsed time. In particular, note whether the failure is before a WebDriver session exists, after a session has been created, or during navigation and resource loading. Keep the client and Grid logs with timestamps; matching the failure phase to the component that owns the timer is more useful than changing several timeout values at once.
| Observed phase | Likely control to inspect | What it means |
|---|---|---|
| New session is waiting or never starts | Grid session-request queue and Node registration/capacity | The request is waiting for a compatible available Node; a longer queue timeout does not create one. |
| Existing session is removed after no commands | Grid Node session timeout | This concerns inactivity between WebDriver commands, not page loading. |
| Session exists, but navigation or a resource stalls | PhantomJS page resource timeout; network, TLS, or proxy behavior | The browser process and session may be healthy while a page request is slow or failing. |
A client-side command timeout may also be involved, but its setting depends on the client binding and deployed versions. Compare its elapsed-time limit with the Grid and PhantomJS logs rather than assuming it is one of the server-side timers below.
#1 Best Overall
Confirm PhantomJS and GhostDriver are actually registered with Grid
PhantomJS exposes its embedded GhostDriver as a remote WebDriver service. The documented Grid registration option is used together with the WebDriver option. Run the version check in the same container, virtual machine, or runtime that launches the test—not just on a developer workstation.
-
Check the invoked binary:
phantomjs --version. PhantomJS troubleshooting recommends confirming the version actually being used. -
Start PhantomJS with the WebDriver service and the Hub URL. For a local Hub on port 4444, GhostDriver documents this legacy example:
Rank #2
phantomjs --webdriver=8080 --webdriver-selenium-grid-hub=http://127.0.0.1:4444The CLI documents
--webdriver-selenium-grid-hubas working only with--webdriver. The example is not a universal deployment recipe: replace the Hub address with the address reachable from the PhantomJS process. See PhantomJS CLI options.DriversCrashes, No Sound, or Screen Glitches?PerformanceWindows Errors? Fix Them Before They SpreadDriversOutdated Drivers Are Slowing You DownSpecial offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Have the WebDriver client connect to the Grid Hub and request
browserName: phantomjs, as described by the GhostDriver setup documentation. That project’s setup text specifies Selenium>= 3.1.0; treat this as historical project guidance, not proof that a current Grid, client, and PhantomJS combination is compatible. -
Check Grid’s status endpoint at the URL appropriate to your deployment. Selenium documents
GET /statusas reporting registered Node state, sessions, and slots. The address differs among standalone, Hub/Node, and fully distributed deployments; use the standalone address, Hub address, or Router address as applicable. See Selenium Grid endpoints.
If PhantomJS does not appear as a registered Node, or there is no compatible free slot, investigate registration, requested capabilities, and capacity before raising a timeout. A queue limit only governs how long a new session can wait.
If the new session is waiting in the Grid queue
Selenium’s current Grid CLI documentation lists --session-request-timeout for a new-session request waiting in the queue. The documented default is 300 seconds. It separately lists --session-timeout, also with a documented default of 300 seconds, for a session with no activity on a Node. These figures are version-sensitive defaults, not recommendations for every deployment; confirm them against the documentation matching your deployed Grid. See Selenium Grid CLI options.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →- Check matching: Make sure a registered Node can satisfy the requested browser name and other capabilities. PhantomJS must be available to the Node that is expected to serve the request.
- Check capacity: Inspect
/statusfor Node state, sessions, and slots. A full Node or absent registration is a different problem from a short queue timeout. - Compare the wait with the configured limit: If requests remain queued until the request limit expires, determine why they cannot be assigned. Increasing the limit can give a valid request more time, but it will not create a compatible Node or release an occupied slot.
Selenium’s Grid getting-started guide describes Grid as a way to route WebDriver sessions across Nodes. Use the deployment’s actual Grid mode and configuration when locating the relevant Hub, Router, and Node.
Rank #4
If an established session disappears after inactivity
Compare the timestamp of the last successful WebDriver command with the time the session is dropped. The Grid --session-timeout setting applies to inactivity on a Node; it is not a page-resource load limit and does not extend the time a new session may wait in the queue.
If the gap between commands is longer than the deployed Node’s configured idle limit, adjust that setting only if the test genuinely needs an idle session to remain open. Otherwise, investigate why the test is not issuing its next command or whether the client has already abandoned the session. Avoid changing --session-request-timeout for an established session: it controls a different phase.
If a page load or resource is the part that hangs
Once a session exists, isolate the page and the network path. PhantomJS’s resourceTimeout page setting is measured in milliseconds. When that interval elapses, the resource request stops trying and the onResourceTimeout callback runs. The documented settings apply during the initial page.open call. Consult the PhantomJS webpage settings reference for the API matching your installation.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
For a PhantomJS script using the documented page API, the relevant diagnostic pattern is to set the page’s resource timeout and log the callback, rather than treating it as a Grid session setting:
var page = require('webpage').create();
page.settings.resourceTimeout = 10000; // milliseconds
page.onResourceTimeout = function (request) {
console.log('Resource timed out: ' + request.url);
};
page.open('https://example.com', function (status) {
console.log('page.open status: ' + status);
phantom.exit();
});
Replace the example URL and choose a limit based on the behavior you need to diagnose. This limits resource requests; it does not repair a blocked request, create a Grid session, or control an idle Node session.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Check network, TLS, and proxy conditions
PhantomJS troubleshooting calls out network transfers and TLS/OpenSSL setup as possible causes of apparent timeouts. Check that the test runtime can reach the target site and that its TLS environment is working. Verify which PhantomJS binary is invoked, particularly when a container or CI job may use a different installation than an interactive shell. See PhantomJS troubleshooting.
The PhantomJS troubleshooting page also notes that on Windows a default proxy can cause substantial network latency and documents --proxy-type=none as a workaround for that situation. Use it only when the Windows/default-proxy condition matches your environment; disabling proxy use indiscriminately can break environments that require one.
Free tools Windows power users keep installed
One-click scans. No signup required.
Troubleshoot common symptoms without masking the cause
| Symptom | What to check | Next action |
|---|---|---|
| New session times out before a session ID is returned | Grid /status, Node registration, free slots, and capability matching |
Fix registration or capacity first; change the queue wait only if the request is valid and needs longer to be assigned. |
| Session works, then vanishes after a quiet interval | Time between the last command and the drop; deployed Node --session-timeout |
Decide whether the session should remain idle that long, then tune the Node inactivity limit if appropriate. |
| Navigation runs, but one URL or page asset stalls | PhantomJS resource timeout and its callback; network transfer and TLS/OpenSSL behavior | Identify the failing resource and address its connectivity or page behavior; do not raise Grid queue limits. |
| Slow requests occur only on Windows | Whether a default proxy is adding latency | For the documented matching condition, test --proxy-type=none; retain the required proxy configuration otherwise. |
| Results differ between local runs and CI | PhantomJS version and binary path in each runtime; Grid deployment and logs | Compare the actual versions and configuration used by both runs before changing limits. |
| All layers appear to be waiting | Timestamped client and Grid logs, plus the page resource callback | Change one control that matches the observed phase and retest on the deployed versions. Raising every timeout together obscures the failing layer. |
Or skip the browser setup
If your actual goal is to capture a website image or PDF—not to run browser interactions through a PhantomJS WebDriver session—ScreenshotNeo is a screenshot API and MCP server for developers. One GET request returns a PNG, JPEG, WebP, or PDF. Its clean-shot options accept cookie or consent banners like a visitor and remove 60+ known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients such as Claude and Cursor.
Example cURL request (replace the target URL and API key):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Every feature is available on every plan. Yearly billing gives two months free. This is a screenshot-capture alternative, not a way to execute a PhantomJS WebDriver test. Sign up for 1,000 free screenshots a month with no card.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

