Re: [GENERAL] unexpected EOF on client connection vs 9.0.3

2011-03-08 Thread rsmogura

On Tue, 08 Mar 2011 11:30:10 +0800, Craig Ringer wrote:

On 08/03/11 02:49, Piotr Czekalski wrote:


I've checked and verified that all connections are closed within the
code, what's more, the problem has appeared just as I've moved 
server
from Fedora Linux x86_64 running Postgres 8.4.2 to the Windows and 
9.0.3
(details above) thus I conclude this is not a client problem indeed 
(the

failure didn't occure on Linux).


Windows firewall?

You can also see these error reports when the connections are closed
uncleanly, without a proper backend close message. Perhaps you have
client processes crashing? Or doing hard shutdowns where the client 
code

doesn't get a chance to run any cleanup/dtors/etc?

--
Craig Ringer


I think in 8.x releases is no need to make any spacial close operation, 
or at least You do not get notice, about it. Closing socket is enough. 
E.g. JDBC driver closes connection, by closing socket. In 9 this changed 
and I see many of such notices in log. Probably Your driver, as many 
others, is written to close socket without backanad message.


Regards,
Radek

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] unexpected EOF on client connection vs 9.0.3

2011-03-08 Thread Francisco Figueiredo Jr.
Indeed those messages appear when the client closes the socket connection only.

Npgsql has connection pooling and if the app domain is unloaded and
there are connections in the pool, those connections don't get a
chance to have the Close message sent to backend server.

So, even when you are correctly closing your connection, you still
will see those messages.

You can prevent that from appearing by disabling the connection
pooling. Which I advise against.

Also, you may want to check if your domain app is being unloaded for
some reason.

I never see any harm being done because the connection exited without
sending the close message. So I think you could (safely?) ignore this
message on this case.

I hope it helps.


On Tue, Mar 8, 2011 at 05:50, rsmogura rsmog...@softperience.eu wrote:
 On Tue, 08 Mar 2011 11:30:10 +0800, Craig Ringer wrote:

 On 08/03/11 02:49, Piotr Czekalski wrote:

 I've checked and verified that all connections are closed within the
 code, what's more, the problem has appeared just as I've moved server
 from Fedora Linux x86_64 running Postgres 8.4.2 to the Windows and 9.0.3
 (details above) thus I conclude this is not a client problem indeed (the
 failure didn't occure on Linux).

 Windows firewall?

 You can also see these error reports when the connections are closed
 uncleanly, without a proper backend close message. Perhaps you have
 client processes crashing? Or doing hard shutdowns where the client code
 doesn't get a chance to run any cleanup/dtors/etc?

 --
 Craig Ringer

 I think in 8.x releases is no need to make any spacial close operation, or
 at least You do not get notice, about it. Closing socket is enough. E.g.
 JDBC driver closes connection, by closing socket. In 9 this changed and I
 see many of such notices in log. Probably Your driver, as many others, is
 written to close socket without backanad message.

 Regards,
 Radek

 --
 Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
 To make changes to your subscription:
 http://www.postgresql.org/mailpref/pgsql-general




-- 
Regards,

Francisco Figueiredo Jr.
Npgsql Lead Developer
http://www.npgsql.org
http://fxjr.blogspot.com
http://twitter.com/franciscojunior

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] unexpected EOF on client connection vs 9.0.3

2011-03-07 Thread Piotr Czekalski

Hello there,

I'm getting regular Postgres log entries with the following error:
2011-03-07 01:00:01 CET LOG:  could not receive data from client: No 
connection could be made because the target machine actively refused it.

2011-03-07 01:00:01 CET LOG:  unexpected EOF on client connection

They always appear together.
The server is PostgreSQL 9.0.3, compiled by Visual C++ build 1500, 
64-bit running on Windows 2008 R2 SP1 x64, the client is a ASP.NET 
application running npgsql.


I've checked and verified that all connections are closed within the 
code, what's more, the problem has appeared just as I've moved server 
from Fedora Linux x86_64 running Postgres 8.4.2 to the Windows and 9.0.3 
(details above) thus I conclude this is not a client problem indeed (the 
failure didn't occure on Linux).
The connections are closed from time to time immediatelly as I get 
ASP.NET errors.


Thanks for any help in advance.

Piotr Czekalski

P.S. The connection string is:
...Server=127.0.0.1;Port=5432;User Id=user here;Password=password 
here;Database=database here;CommandTimeout=360; providerName=Npgsql...

--

--
TECHBAZA.PL Sp. z o.o.
Technologie WEB, eDB  eCommerce
tel. (+4832) 7186081
fax. (+4832) 7003289
email: bi...@techbaza.pl



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] unexpected EOF on client connection vs 9.0.3

2011-03-07 Thread Craig Ringer
On 08/03/11 02:49, Piotr Czekalski wrote:

 I've checked and verified that all connections are closed within the
 code, what's more, the problem has appeared just as I've moved server
 from Fedora Linux x86_64 running Postgres 8.4.2 to the Windows and 9.0.3
 (details above) thus I conclude this is not a client problem indeed (the
 failure didn't occure on Linux).

Windows firewall?

You can also see these error reports when the connections are closed
uncleanly, without a proper backend close message. Perhaps you have
client processes crashing? Or doing hard shutdowns where the client code
doesn't get a chance to run any cleanup/dtors/etc?

--
Craig Ringer

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] unexpected EOF on client connection

2010-09-20 Thread Eric Ndengang

 Hello everybody,
Our Company get two Cluster environment with postgres 8.4.4 installed.
Both Clusters have the same  Structure (Tables, Functions, ...)
In one of them  I am recently getting many entries in the log on this type:

2010-09-20 14:21:25 CEST [31010]: [1-1] user=edarling,db=edarlingdb 
LOG:  unexpected EOF on client connection
2010-09-20 14:21:34 CEST [31158]: [1-1] user=edarling,db=edarlingdb 
LOG:  unexpected EOF on client connection
2010-09-20 14:21:42 CEST [31409]: [1-1] user=edarling,db=edarlingdb 
LOG:  unexpected EOF on client connection
2010-09-20 14:21:51 CEST [31492]: [1-1] user=edarling,db=edarlingdb 
LOG:  unexpected EOF on client connection


What really strange is, is that every  Application get connected through 
the Database using the Users 'edarlingapp' or edarlingadmin. The 
edarling user is only used for administrative purpuses .


Any idea how i could solve this issue?
Thanks in advance





--
Eric Ndengang
Junior Datenbankentwickler

Affinitas GmbH  |  Kohlfurter Straße 41/43  |  10999 Berlin  |  Germany
email: eric.ndengang_fo...@affinitas.de  | tel: +49.(0)30. 991 949 5 0  |  
www.edarling.de

Geschäftsführer: Lukas Brosseder, David Khalil, Kai Rieke, Christian Vollmann
Eingetragen beim Amtsgericht Berlin, HRB 115958



Re: [GENERAL] unexpected EOF on client connection

2010-09-20 Thread Vick Khera
On Mon, Sep 20, 2010 at 8:31 AM, Eric Ndengang
eric.ndengang_fo...@affinitas.de wrote:
 2010-09-20 14:21:51 CEST [31492]: [1-1] user=edarling,db=edarlingdb LOG:
 unexpected EOF on client connection

 What really strange is, is that every  Application get connected through the
 Database using the Users 'edarlingapp' or edarlingadmin. The edarling user
 is only used for administrative purpuses .

 Any idea how i could solve this issue?


Find the program that is exiting without disconnecting the DB, and fix
it so that it doesn't do that.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Unexpected EOF on client connection

2009-12-04 Thread Howard Cole

David Boreham wrote:
Sampling the number of connections on my database I decided that the 
number of connections settled at 6 so I changed my MinPoolSize from 3 
to 6. I checked the current state of the database and the number of 
connections is currently 12. Tonight I shall change the MinPoolSize 
to 8 and I am wondering if the number of connections used is going to 
appear as 16!



Pretty soon you'll discover that you have two instances of the pool :)


lol.

Changed the MinPoolSize and the number of connections is exactly the 
pool size at the moment. So no doubling up this time. The npgsql pooling 
appears to be working as expected. The errors are still appearing in the 
log.


What happens to new connections that exceed the pool size? Are the 
connections added to the pool briefly, or are they created outside the 
pool and allowed to timeout on their own? Also are the pooled 
connections set to renew if they timeout, or do they never timeout?



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Unexpected EOF on client connection

2009-12-03 Thread Howard Cole

Howard Cole wrote:
Thanks Francisco - I currently have MinPoolSize set to 3 (I have a lot 
of databases on this cluster), I think this copes 90% of the time but 
I shall set it to 10 and see what happens.


Sampling the number of connections on my database I decided that the 
number of connections settled at 6 so I changed my MinPoolSize from 3 to 
6. I checked the current state of the database and the number of 
connections is currently 12. Tonight I shall change the MinPoolSize to 8 
and I am wondering if the number of connections used is going to appear 
as 16!


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Unexpected EOF on client connection

2009-12-03 Thread David Boreham

Howard Cole wrote:

Howard Cole wrote:
Thanks Francisco - I currently have MinPoolSize set to 3 (I have a 
lot of databases on this cluster), I think this copes 90% of the time 
but I shall set it to 10 and see what happens.


Sampling the number of connections on my database I decided that the 
number of connections settled at 6 so I changed my MinPoolSize from 3 
to 6. I checked the current state of the database and the number of 
connections is currently 12. Tonight I shall change the MinPoolSize to 
8 and I am wondering if the number of connections used is going to 
appear as 16!



Pretty soon you'll discover that you have two instances of the pool :)



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Unexpected EOF on client connection

2009-12-02 Thread Howard Cole

Francisco Figueiredo Jr. wrote:

Presumably I should never get this error if I use Npgsql?

  


That's correct. But there may be a bug in Npgsql code itself.
That's why I asked you to try to raise minpoolvalue to check if you
see less errors.

I hope it helps.


  
Thanks Francisco - I currently have MinPoolSize set to 3 (I have a lot 
of databases on this cluster), I think this copes 90% of the time but I 
shall set it to 10 and see what happens.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Unexpected EOF on client connection

2009-12-01 Thread Howard Cole

I am getting many entries in my log of this type:

2009-12-01 00:13:19 GMTLOG: unexpected EOF on client connection
2009-12-01 00:13:19 GMTLOG could not receive data from client: No 
connection could be made because the target machine actively refused it.


I tend to get these message in batches of 2 to 8 - checking the number 
of connections at the time, they do not appear to be overloaded.


I am running 8.4.1 on Windows 2K3 with a C# application using Npgsql. 
All connections are to the localhost and there is no firewall.


Help!

Howard Cole
www.selestial.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Unexpected EOF on client connection

2009-12-01 Thread Richard Broersma
On Tue, Dec 1, 2009 at 7:52 AM, Howard Cole howardn...@selestial.com wrote:
 I am getting many entries in my log of this type:

 2009-12-01 00:13:19 GMTLOG: unexpected EOF on client connection
 2009-12-01 00:13:19 GMTLOG could not receive data from client: No connection
 could be made because the target machine actively refused it.

 I tend to get these message in batches of 2 to 8 - checking the number of
 connections at the time, they do not appear to be overloaded.

 I am running 8.4.1 on Windows 2K3 with a C# application using Npgsql. All
 connections are to the localhost and there is no firewall.

I'm going to make a guess that your client application is not
explicitly closing the C# connection objects before the objects go out
of scope.  Once the object become eligible for the garbage collector,
its destroyed and then Postgres notices that it can talk to the client
anymore. Hence you get the above mentioned error.


-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Unexpected EOF on client connection

2009-12-01 Thread Francisco Figueiredo Jr.
On Tue, Dec 1, 2009 at 13:52, Howard Cole howardn...@selestial.com wrote:
 I am getting many entries in my log of this type:

 2009-12-01 00:13:19 GMTLOG: unexpected EOF on client connection
 2009-12-01 00:13:19 GMTLOG could not receive data from client: No connection
 could be made because the target machine actively refused it.

 I tend to get these message in batches of 2 to 8 - checking the number of
 connections at the time, they do not appear to be overloaded.

 I am running 8.4.1 on Windows 2K3 with a C# application using Npgsql. All
 connections are to the localhost and there is no firewall.



Maybe this is Npgsql removing connections from pool after some time.
But it may not be this case because Npgsql finishes the connection
correctly when removing it from the pool.

You can confirm that by playing with your max connection pool and min
connection pool values in your connection string. Try to put a higher
value of min connection pool, so they aren't closed too frequently.


Also, as Richard said, check your connection usage pattern in your application.

I hope it helps.





-- 
Regards,

Francisco Figueiredo Jr.
Npgsql Lead Developer
http://www.npgsql.org
http://fxjr.blogspot.com
http://twitter.com/franciscojunior

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Unexpected EOF on client connection

2009-12-01 Thread Howard Cole

Richard Broersma wrote:

On Tue, Dec 1, 2009 at 7:52 AM, Howard Cole howardn...@selestial.com wrote:
  

I am getting many entries in my log of this type:

2009-12-01 00:13:19 GMTLOG: unexpected EOF on client connection
2009-12-01 00:13:19 GMTLOG could not receive data from client: No connection
could be made because the target machine actively refused it.

I tend to get these message in batches of 2 to 8 - checking the number of
connections at the time, they do not appear to be overloaded.

I am running 8.4.1 on Windows 2K3 with a C# application using Npgsql. All
connections are to the localhost and there is no firewall.



I'm going to make a guess that your client application is not
explicitly closing the C# connection objects before the objects go out
of scope.  Once the object become eligible for the garbage collector,
its destroyed and then Postgres notices that it can talk to the client
anymore. Hence you get the above mentioned error.

  
I am quite thorough and keep database access restricted to a single 
class with strict exception handling to catch errors. And force the 
connection to close / force disposal everywhere. But I shall certainly 
be checking my code - thanks for the tip.


Interesting what Francis says about the pool connections being closed 
before disposal. Presumably I should never get this error if I use Npgsql?



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Unexpected EOF on client connection

2009-12-01 Thread Howard Cole

Howard Cole wrote:


Interesting what Francis says about the pool connections being closed 
before disposal. 

Apologies Francisco

Presumably I should never get this error if I use Npgsql?




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Unexpected EOF on client connection

2009-12-01 Thread Francisco Figueiredo Jr.
On Tue, Dec 1, 2009 at 21:39, Howard Cole howardn...@selestial.com wrote:
 Howard Cole wrote:

 Interesting what Francis says about the pool connections being closed
 before disposal.

 Apologies Francisco


:) No problem.


 Presumably I should never get this error if I use Npgsql?


That's correct. But there may be a bug in Npgsql code itself.
That's why I asked you to try to raise minpoolvalue to check if you
see less errors.

I hope it helps.


-- 
Regards,

Francisco Figueiredo Jr.
Npgsql Lead Developer
http://www.npgsql.org
http://fxjr.blogspot.com
http://twitter.com/franciscojunior

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general