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
ConnectionClosed exception #86
Comments
Maybe we could try debug it with something like phptrace. Is there a way to work around this for now and reconnect manually? I tried to implement it today but since I can't reproduce the issue reliably I have no way to test if it works. |
See the issue I linked. There is an issue on EventStore.org repo where a
workaround is posted. As for myself: never tried it, I just restarted the
process (supervisord).
…On Tue, Mar 26, 2019, 14:21 Jáchym Toušek ***@***.***> wrote:
Maybe we could try debug it with something like phptrace
<https://github.com/Qihoo360/phptrace>.
Is there a way to work around this for now and reconnect manually? I tried
to implement it today but since I can't reproduce the issue reliably I have
no way to test if it works.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYEvFHebpDMqsjPqCCMU_f0kZRV7n7Hks5vamUPgaJpZM4cLFpV>
.
|
It seems that reconnecting doesn't really help. Or actually it does but it only projects a few events before the connection is closed and then it takes several seconds to reconnect. This is completely useless because I have tens of thousands of events waiting in the queue so with a pause after every few events it will never finish. Here is something from
|
Do you know what is the heartbeat about? Could some changes to I found the default values here but I'm not sure what settings I should try. The issue is still not easy to reproduce for me to experiment with it properly. Btw. the failure seems to always occur right after an event that is somewhat bigger than usual (holds more data inside). |
Hypothesis: Maybe the heartbeat does not occur while I'm processing an event so if the processing of one event takes longer than |
Upon further investigation: This is not a bug in the library! The problem occurs when the server is sending too many data for the client to handle and thus the server decides, the connection is broken, because too much data is piling up. There are two possible options:
Most of the times, the server is much faster sending data than any php script could handle. |
Our command that connects to persistent subscription to project events into a SQL database sometimes fails with
Prooph\EventStore\Exception\ConnectionClosed
.Here is the relevant part of the stack trace:
I checked some other similar issues and as far as I can tell it seems I need to implement a reconnecting logic here. Can you give me some advice how to do it? The async code confuses me and I'm not even sure if I can reuse the same
EventStoreConnection
instance or if I need a new one. Once I understand it I'll gladly send a PR to improve the example.The text was updated successfully, but these errors were encountered: