What are the positive and negative effects for command timeout 0 on string postgres connectivion?

Asked

Viewed 22 times

0

Hello, I was constantly getting this mistake

Response/Exception: An exception has been raised that is likely due to a transient failure. - System.TimeoutException: The operation has timed out.

Then I researched a little about and put in my default conection string the timeout=0 command;

The errors have stopped, but I am doubtful whether this could be detrimental to my application. Is it right to do it or am I wrong? There’s another way to fix it?

  • From the manual: "connect_timeout: Zero, Negative, or not specified Means Wait indefinitely." so you need to ensure in some other way that there will be no connection errors leading to an infinite wait. Would specifying a maximum time you think reasonable to expect not be more convenient?

  • Got it, thank you very much!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.