Skip to content

Detect a server that stops responding with a heartbeat - #227

Merged
smnandre merged 4 commits into
playwright-php:mainfrom
smnandre:fix/server-heartbeat
Nov 23, 2026
Merged

smnandre merged 4 commits into
playwright-php:mainfrom
smnandre:fix/server-heartbeat

Conversation

@smnandre

Copy link
Copy Markdown
Member

Since 1.5.1, a call made without a timeout has no deadline, so a Node
server that stops responding hangs the PHP process forever.

The PHP client now throws a TimeoutException when the server has been
silent for 30 seconds during a call. The server sends a heartbeat every
5 seconds while it works, so long-running calls are never cut and idle
time between calls is never counted.

A server whose event loop keeps running while a command never settles
still sends heartbeats, so that case is not detected.

Fixes #212

@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@smnandre
smnandre merged commit 30648b2 into playwright-php:main Nov 23, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A call without a timeout has no RPC deadline since 1.5.1, so a server that stops answering hangs PHP

1 participant