Connection idle broken

Started by Fernando Xavierover 18 years ago7 messagesgeneral
Jump to latest
#1Fernando Xavier
fernandoxavier@yahoo.com

Hi,

I have trouble with my java application. Since i change the network configuration, the postgresql idle connections broken after 10 minutes. (i set authentication_timeout = 600 in postgresql.conf).

My network:

192.168.1.1 (postgresql server and gateway server)
192.168.0.1 (linksys wireless router)
192.168.0.x (clients)

How i make my idle connections alive for long time?

Any idea?

Regards,

Fernando

Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento!
http://br.mail.yahoo.com/

#2Doug McNaught
doug@mcnaught.org
In reply to: Fernando Xavier (#1)
Re: Connection idle broken

On 11/27/07, Fernando Xavier <fernandoxavier@yahoo.com> wrote:

Hi,

I have trouble with my java application. Since i change the network
configuration, the postgresql idle connections broken after 10 minutes. (i
set authentication_timeout = 600 in postgresql.conf).

My network:

192.168.1.1 (postgresql server and gateway server)
192.168.0.1 (linksys wireless router)
192.168.0.x (clients)

How i make my idle connections alive for long time?

Is the Linksys doing NAT? Can you configure it with a longer timeout on
inactive connections?

-Doug

Any idea?

Show quoted text

Regards,

Fernando

Abra sua conta no Yahoo! Mail, o único sem limite de espaço para
armazenamento!
http://br.mail.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

#3Scott Marlowe
scott.marlowe@gmail.com
In reply to: Fernando Xavier (#1)
Re: Connection idle broken

On Nov 27, 2007 8:33 AM, Fernando Xavier <fernandoxavier@yahoo.com> wrote:

Hi,

I have trouble with my java application. Since i change the network configuration, the postgresql idle connections broken after 10 minutes. (i set authentication_timeout = 600 in postgresql.conf).

My network:

192.168.1.1 (postgresql server and gateway server)
192.168.0.1 (linksys wireless router)
192.168.0.x (clients)

How i make my idle connections alive for long time?

You can try lowering your tcp_keepalive settings.

#4Doug McNaught
doug@mcnaught.org
In reply to: Scott Marlowe (#3)
Re: Connection idle broken

On 11/27/07, Fernando Xavier <fernandoxavier@yahoo.com> wrote:

Hi, thanks for reply!

No, my router don't have configurations for timeout connections..

Get a better router then. Something between your clients and the
database server is timing out those connections, and it's most likely
that box--NAT connections are timed out fairly aggressively by default
on consumer routers (you didn't say whether you were using NAT or not,
but it may be turned on by default). Relying on anything labeled
"Linksys" for production work is a terrible idea.

Also, please keep your replies on the mailing list so others can
benefit from the discussion.

-Doug

#5Scott Marlowe
scott.marlowe@gmail.com
In reply to: Doug McNaught (#4)
Re: Connection idle broken

On Nov 27, 2007 12:33 PM, Douglas McNaught <doug@mcnaught.org> wrote:

Get a better router then. Something between your clients and the
database server is timing out those connections, and it's most likely
that box--NAT connections are timed out fairly aggressively by default
on consumer routers (you didn't say whether you were using NAT or not,
but it may be turned on by default). Relying on anything labeled
"Linksys" for production work is a terrible idea.

Actually, if you use the linux based ones, or download dd-wrt or
openwrt and install that, the linksys routers are quite stable,
reliable, and performant.

Myself, I prefer the pre-installed buffalo router that DD-WRT ships,
but the software they make is quite amazing.

#6Doug McNaught
doug@mcnaught.org
In reply to: Scott Marlowe (#5)
Re: Connection idle broken

On 11/27/07, Scott Marlowe <scott.marlowe@gmail.com> wrote:

On Nov 27, 2007 12:33 PM, Douglas McNaught <doug@mcnaught.org> wrote:

Get a better router then. Something between your clients and the
database server is timing out those connections, and it's most likely
that box--NAT connections are timed out fairly aggressively by default
on consumer routers (you didn't say whether you were using NAT or not,
but it may be turned on by default). Relying on anything labeled
"Linksys" for production work is a terrible idea.

Actually, if you use the linux based ones, or download dd-wrt or
openwrt and install that, the linksys routers are quite stable,
reliable, and performant.

I'm sure they are. Custom software helps a lot. :)

That said, my definition of "production" doesn't include hardware
that's built as cheaply as possible for the consumer market. Others
may differ, and the OPs need may very well be satisfied by a custom
software load on a cheap consumer router.

#7Scott Marlowe
scott.marlowe@gmail.com
In reply to: Doug McNaught (#6)
Re: Connection idle broken

On Nov 27, 2007 12:50 PM, Douglas McNaught <doug@mcnaught.org> wrote:

On 11/27/07, Scott Marlowe <scott.marlowe@gmail.com> wrote:

Actually, if you use the linux based ones, or download dd-wrt or
openwrt and install that, the linksys routers are quite stable,
reliable, and performant.

I'm sure they are. Custom software helps a lot. :)

That said, my definition of "production" doesn't include hardware
that's built as cheaply as possible for the consumer market. Others
may differ, and the OPs need may very well be satisfied by a custom
software load on a cheap consumer router.

Well, if I had a choice between a single internet connection on a big
cisco, and a dual connect through a sonet ring through a pair of
buffalo consumer grade routers with dd-wrt, I'd take the sonet ring.

Course, we'd all rather have both the sonet ring and the big
commercial routers...

(am seriously amazed how many 24/7 ops are out there running with a
sonet ring into the building that turns into a single point of failure
after that. )