wg/epgsql — Issue #10: Clearer documentation for timeout
Author: mwarnock
Created: 2011-10-27 19:11:38+00:00
State: open

Great library, it's been very helpful. But if I was to change anything I'd ask that the documentation about the timeout be a little clearer. In the readme it says the timeout option is for connections when in reality it is also used by the finite state machine to timeout queries.

As you probably already know, that means that using the default of 5 seconds will return an {error,timeout} on any query that takes more than 5 seconds.

Just for context:
I'm using this in conjunction with epgsql_pool and pounding the snot out of a >350,000,000 record table that I haven't bothered to partition yet so it manifested when I was doing ~500 inserts a second. After I looked through pgsql_connection.erl I saw that timeout was being passed to the state record as well. I then upped the timeout to 60,000 in the options I pass in and I stopped getting {error,timeout} returned from queries.