Re-Connection Issue

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
HumanShield
Posts: 7
Joined: Mon 24 Apr 2006 14:30

Re-Connection Issue

Post by HumanShield » Tue 23 May 2006 22:25

I'm running the 2.50 stable version of the driver in an ASP.NET 1.1 application. Every now and again, our DB server gets into a deadlock situation, all of the ASP.NET queries begin backing up, and then we get the exception:

"Connection Limit Exceeded For Non-Superusers"

We're running two web servers, with a basically default connection string - from what I understand includes connection pooling enabled and 100 connections in each pool.

That's one issue of oddness, we have our max connections on the server set to 500, and everything else connecting will account for no more than 100 connections. Has anyone had a similar experience? We always connection.close() and connection.dispose() after every interaction with the driver.

The larger issue - is that the driver seems to just "give up" after a certain amount of time and won't try to reconnect anymore even after all connections are freed up. We get a simple "Connection Failure" exception until we restart the application pool or IIS on both web servers. This can easily be reproduced by simply restarting our postgres server. Any ideas on this?

Thanks in advance!

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 24 May 2006 09:56

Execute

Code: Select all

select * from  pg_stat_activity
statement and analyze the results. Is there really 500 connections?
If you use only one web server, do you experience the same problems?

HumanShield
Posts: 7
Joined: Mon 24 Apr 2006 14:30

Post by HumanShield » Thu 25 May 2006 14:45

I'll check into pg_stat_activity - we're at 32 connections right now. Once we're under some load a little later today I'll have to check again.

It's hard to test this since we've tuned things to avoid the deadlock - I can probably force it to happen late tonight. I'll post more info once available.

Do you have any idea why the driver would stay in a permanently failed state?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 26 May 2006 08:51

Looking forward to the information you'll provide.

HumanShield
Posts: 7
Joined: Mon 24 Apr 2006 14:30

Post by HumanShield » Sat 24 Jun 2006 00:12

It has done this afew more times - though much less frequently with our optimizations. And no, the connections to the server drop way down - we're not out of connections.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 26 Jun 2006 11:24

Please describe here in the forum what exactly you need or what is the
problem.

HumanShield
Posts: 7
Joined: Mon 24 Apr 2006 14:30

Post by HumanShield » Mon 26 Jun 2006 22:28

I'm running an ASP.NET 1.1 web application on two Windows 2003 servers using your driver to connect to a Postgres v8.1 instance on ubuntu.

If I run "/etc/init.d/postgresql-8.1 restart" - I then have to restart IIS on both machines because the driver fails to reconnect.

That's my main issue here. I'm looking for a possible solution, suggestion, or bug fix on your part.

I had posted a question about memcached - but it looks like it got cleared out along with the Spam - is there an issue with inquring about a possible feature, or was it accidently deleted?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 27 Jun 2006 15:08

Finally we could find a reconnection failure problem. Now we are investigating it. You will be notified on results here as soon as possible.

HumanShield
Posts: 7
Joined: Mon 24 Apr 2006 14:30

Post by HumanShield » Fri 29 Sep 2006 15:36

Any update?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 02 Oct 2006 09:23

You can't reconnect to ProstgreSQL because of dead connections in the pool. Try to clear the pool using appropriate method of PgSqlConnection component after each restart.

Post Reply