Skip to content

Fix http/2 ping flood behaviour#386

Open
kafkiansky wants to merge 1 commit intoamphp:3.xfrom
kafkiansky:fix-ping-flood-behaviour
Open

Fix http/2 ping flood behaviour#386
kafkiansky wants to merge 1 commit intoamphp:3.xfrom
kafkiansky:fix-ping-flood-behaviour

Conversation

@kafkiansky
Copy link
Copy Markdown

Hi. I’m building a gRPC server with long-lived client/server/bidirectional streams.
In such streams it is normal to receive many HTTP/2 PING frames without new HEADERS, because subsequent gRPC messages are sent as DATA on an already open stream.

In amphp/http-server, the ping counter was effectively reset on new request headers, but not on incoming stream data. That caused active gRPC streams to be misclassified as ping abuse, eventually triggering GOAWAY (Too many pings).

My fix is to reset the ping counter when DATA is received on an active stream. Inbound DATA is valid application activity, so these pings are not an idle ping flood.

@kafkiansky kafkiansky mentioned this pull request Apr 5, 2026
8 tasks
webpatser added a commit to webpatser/fledge-fiber that referenced this pull request Apr 10, 2026
Security:
- Fix HTTP/2 ping flood on active streams (amphp/http-server#386)

Bug fixes:
- Use VarString for string params in binary protocol (amphp/mysql#142)
- Decode BIT columns as int instead of string (amphp/mysql#138)
- Close connections on pool destruct (amphp/http-client#396)
- Fix duplicate keys in byte-stream split() (amphp/byte-stream#113)
- Fix Closure type annotation for static analysis (amphp/amp#451)
- Safely handle DisposedException on unsubscribe (amphp/redis#100)

Features:
- Add TLS support for Redis connections (amphp/redis#98)
- Add disperse() for concurrent closure execution (amphp/amp#460)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant