Connection establishment timeout

455 views
Skip to first unread message

Francisco Figueiredo Jr.

unread,
Jan 30, 2014, 11:50:06 AM1/30/14
to npgsq...@googlegroups.com

Connection establishment timeout

 Monitor Forum |  Save Place | Start New Thread Start New Thread
Connection establishment timeout
By: Quentin Le Guennec on 2014-01-30 13:45
[forum:1020976]
Move thread Edit Delete Add


mono version: 3.2.3
postgres version: 9.3.2

client: #1 SMP PREEMPT
Linux 3.12.9.1-ARCH x86_64 GNU/Linux

server: #1 SMP PREEMPT
Linux 3.10.27-2-ARCH armv6l GNU/Linux


Hi, i'm trying to use Npgsql via the mono compiler, and i can't manage to connect to my remote database. 
Here's my connection string
:dbcon = new NpgsqlConnection ("Server=" + server + ";" +
"Port=" + port + ";" +
"Database=" + database + ";" +
"User Id=" + user + ";" +
"Password=" + password + ";Pooling=True;MINPOOLSIZE=4;MAXPOOLSIZE=15" );

I tried different values for Pooling, MINPOOLSIZE and MAXPOOLSIZE. I triple checked the values for server, port, database, user id and password. Debugging shows that monodevelop seems to spawn various threads (i guess it's mandatory)

Finally, here's the exception thrown:

Unhandled Exception:
Npgsql.NpgsqlException:
Connection establishment timeout. Increase Timeout value in ConnectionString.
at Npgsql.NpgsqlClosedState.Open (Npgsql.NpgsqlConnector context) [0x001a5] in /build/mono/src/mono-3.2.3/mcs/class/Npgsql/Npgsql/NpgsqlClosedState.cs:154 
at Npgsql.NpgsqlConnector.Open () [0x00056] in /build/mono/src/mono-3.2.3/mcs/class/Npgsql/Npgsql/NpgsqlConnector.cs:674 
at Npgsql.NpgsqlConnectorPool.GetPooledConnector (Npgsql.NpgsqlConnection Connection) [0x000db] in /build/mono/src/mono-3.2.3/mcs/class/Npgsql/Npgsql/NpgsqlConnectorPool.cs:340 
[ERROR] FATAL UNHANDLED EXCEPTION: Npgsql.NpgsqlException:
Connection establishment timeout. Increase Timeout value in ConnectionString.
at Npgsql.NpgsqlClosedState.Open (Npgsql.NpgsqlConnector context) [0x001a5] in /build/mono/src/mono-3.2.3/mcs/class/Npgsql/Npgsql/NpgsqlClosedState.cs:154 
at Npgsql.NpgsqlConnector.Open () [0x00056] in /build/mono/src/mono-3.2.3/mcs/class/Npgsql/Npgsql/NpgsqlConnector.cs:674 
at Npgsql.NpgsqlConnectorPool.GetPooledConnector (Npgsql.NpgsqlConnection Connection) [0x000db] in /build/mono/src/mono-3.2.3/mcs/class/Npgsql/Npgsql/NpgsqlConnectorPool.cs:340 

Francisco Figueiredo Jr.

unread,
Jan 30, 2014, 12:01:01 PM1/30/14
to npgsq...@googlegroups.com

I think you may already have tried that, but just to be sure, are you being able to connect with other programs in the TCP port 5432?

There shouldn't be any problem connecting with Npgsql. Please, check out the tcp configuration in the postgresql server and let us know if everything is ok.

Also, did you try to connect from a windows machine with ms.net?
Reply all
Reply to author
Forward
0 new messages