-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lots of ESTABLISHED proxy connection leave in system #4
Comments
I think may need use SO_KEEPALIVE for socket options to active tcp keepalive check timer. |
It's little bit weired, when we change to another proxy provider, it's all normal now. |
After lots of debug, I found that handleUpgradeResponse() and the target site is h2 make socket will not be closed. This makes socket will not close when __destruct, will not close in idle watcher. |
When proxy connection from ResourceSocket upgrade to UpgradedSocket, and visit website via HTTP 2 protocol by a proxy chain, the connection wil be hang on UpgradedSocket->read() in Http2ConnectionProcessor. Socket->read() will never return. |
Too much logic, can't dig. |
I'm now added a check timer, to get all stream resources by in php process, and filter all outgoing by proxy connections, then check connection survival time, and force close it. The issue fixed by this way, not a good way. |
Could you please check whether this issue persists with the Amp v3 based versions? |
We're not yet upgrade this project into Amp v3 based version, the whole framework base on Amp v2, this project has withstood many concurrency and stability tests. We're using Amp v3 based framework in new project, but still developing. |
This issue is less important at the moment because resource's scanning and cleaning mechanisms remedy it. The more troublesome thing is that it is difficult to find a way to reproduce this. I suspect that the frequent read timeouts are related to this. |
Lots of ESTABLISHED proxy connection leave in system, ss command return no keepalive timer.
It's 15:44 now, but the connection created at 13:01, client is already destruct in php:
ss info has no keepalive timer:
ss normal connection:
I have use php-meminfo (https://github.com/BitOne/php-meminfo) extension to detect the
Amp\Http\Client\HttpClient
andAmp\Http\Tunnel\Http1TunnelConnector
instance count is normal, but the connection leave too much.Where the problem it is?
The text was updated successfully, but these errors were encountered: