Unnecessary 'resume' of an input stream by skydiablo · Pull Request #525 · reactphp/http · GitHub
Skip to content

Unnecessary 'resume' of an input stream#525

Open
skydiablo wants to merge 3 commits into
reactphp:1.xfrom
skydiablo:1.x
Open

Unnecessary 'resume' of an input stream#525
skydiablo wants to merge 3 commits into
reactphp:1.xfrom
skydiablo:1.x

Conversation

@skydiablo

Copy link
Copy Markdown

I have cleared up behavior here that I couldn't comprehend. A "resume" at this point leads to several streams that need to be managed again by the loop, which were previously removed by a close-event. With a high number of client requests, the number of possible streams becomes too high, leading to a crash. The streams added back to the loop here eventually disappear "automagically," but this is not really comprehensible to me. Additionally, there is a significant increase in memory usage.

@SimonFrings

Copy link
Copy Markdown
Member

@skydiablo

Copy link
Copy Markdown
Author

okay, i see... can i force to close the socket by my own?

@skydiablo

Copy link
Copy Markdown
Author

context: i have implemented an influxDB line-protokoll sever, to proxy this into another service. so i'm using the replaction API from indluxDB itself (https://docs.influxdata.com/influxdb/v2/write-data/replication/replicate-data/) to receive new data. the influxDB server is flooding me with sockets and data, and it seems that the connection is not instantly disconnected from influxDB server. so i have many open connection and hit the hard-limit of 1024 sockets in a short time. after some time, influxDB is closing the connection, but the connection seems never be reused. so may i can hard close this connection by my server.

@skydiablo

Copy link
Copy Markdown
Author

hmmm, i realy play around with this issue but i can not found a workaround with original code. maybe someone can put me in the right direction? i'm running all the time in the streams limit of 1024 ... the only thing what i can do is maybe put a load balancer in front of this and spawn some of my services?

@skydiablo

skydiablo commented Jun 7, 2024

Copy link
Copy Markdown
Author

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.

2 participants