Transport channel is closed

Transport channel is closed

Postby anthares » Fri 13 Sep 2013 07:45

Hello everybody,

After few days of debugging, I've decided to check here if anyone has any idea of why I am getting the error "Transport channel is closed".

I am using dotConnect for PostgreSQL in order to connect to a PostgreSQL DB. The application is composed by a WCF Service and by one or more clients. I've implemented a sort of "heartbeat" to let the clients know if the server is alive. Each client creates a separate thread that loops and every second it calls a "Ping" WCF Web Method in the server. The method interacts with the database in order to persist the state (ALIVE/DEAD) of the server-terminal.

Out of the blue, sometimes, I get the "Transport channel is closed" exception. IIS still answers and I can retrieve the web service's metadata. Yet I am not able to invoke any method that accesses the database as I am returned that error.

Does Devart dotConnecct for PostgreSQL support multithreading access? Is there any parameter I should set in the connection string? Is this a bug? (I've seen something similar was found in dotConnect for MySQL).

Thanks in advance,
Posts: 1
Joined: Fri 13 Sep 2013 07:36

Re: Transport channel is closed

Postby Pinturiccio » Fri 13 Sep 2013 15:14

dotConnect for PostgreSQL (and dotConnect for MySQL) is not thread safe, so you should use a separate connection for each thread or synchronize the threads yourself.

Try running your application without using the connection pool. For this, set the parameter "Pooling=false;" in the connection string for all connections. Is the issue reproduced in this case?
Devart Team
Posts: 1983
Joined: Wed 02 Nov 2011 09:44

Return to dotConnect for PostgreSQL