Skip to content

Conversation

@lleirborras
Copy link
Member

No description provided.

@lleirborras
Copy link
Member Author

@amicojeko This should fix our issues, please review

yield
end
rescue *CONNECTION_ERRORS => e
if @retry_on_connection_error && retries < 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So will retry only 1 time? Can be better to set a max_retries param to retry N times?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting but In my view it's not needed. The kind of error we are facing it's a network issue that closes the PG connection. With 1 retry it reconnects and it works, if that's not the case it may well be another issue and we just raise the error.

@lleirborras
Copy link
Member Author

@MirkoMignini what about now?

@MirkoMignini
Copy link
Member

@lleirborras I suggest a param delay (ms) between retries. This way we can test N times for a long time so we will see if is stuck forever or is a temporary network issue

@MirkoMignini
Copy link
Member

@lleirborras This reconnect didn't solve the problem as quasar, that is using this branch, is still affected. Our rails applications aren't affected by PS:UnableToSend problem but only this gem, I see that rails internally retry one time in case of error but using the postgres reset method, I will try the same!

@MirkoMignini
Copy link
Member

@lleirborras I added a 0.5 sleep between every retry, I will test in scriptoria (and I will increase also the max retries a little bit)

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.

3 participants