Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.postgresql > #265
| From | durumdara <durumdara@gmail.com> |
|---|---|
| Newsgroups | comp.databases.postgresql |
| Subject | Re: Windows: when the Session deleted/resources released? |
| Date | 2011-10-25 08:02 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <82d7e63b-0d82-4553-b910-528d253efdba@v28g2000vby.googlegroups.com> (permalink) |
| References | <f225e285-56a8-45c3-b4ab-42b36ff67804@y32g2000yqh.googlegroups.com> <1319536517.567090@proxy.dienste.wien.at> |
Hi! > But: after (I started the XP client) 2 hours passed, and the sessions > starting to vanish one by one. > So may the timeout is "2 hours" now in the system (Win7/x64). > > Read this:http://technet.microsoft.com/en-us/library/cc782936(WS.10).aspx > REG_DWORD 0x1–0xFFFFFFFF (milliseconds) 0x6DDD00 (7,200,000 > milliseconds = 2 hours) > > > Thanks: > dd I continued the testing. This value is commonly used to abort the TCP alives at a specific time: HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\KeepAliveTime See here: http://www.symantec.com/business/support/index?page=content&id=HOWTO56221 If the pgsql server is set to 0 in all tcp params, this timeout used. And it was working: I opened many connections, locks in second PC, next disconnected the cable, and after 5-6 minutes these Sessions vanished. But: my opinion that this "hacking" of the system is very wrong. Why? 1.) Many places the registry is taboo. In some places for local system administrators don't have enough right to set these parameters!!! 2.) The registry setting is global - so we can get side effects in other programs. For example if I have 4 PGSQL server, but one of them needs 10 minutes timeout - others only 5 minutes... 3.) This is used for PostgreSQL only. Why don't PostgreSQL handle these kind of Session Timeouts? Okay, the TCP/IP is out of your scope. But you can do other things, like separate the Session from TCPIP. For example: Every TCPIP connection is join to a Session. When a Session timeout reached (new parameter by server), the Session (+ resources) closed, and only TCPIP connection remaining - without the Session. If some packet we got from TCPIP connection that released the Session, we resend an error (Session closed, reconnection is not possible). Then your TCPIP model (what based on OS settings in Windows) can remaining. Thanks for your read: dd
Back to comp.databases.postgresql | Previous | Next — Previous in thread | Next in thread | Find similar
Windows: when the Session deleted/resources released? durumdara <durumdara@gmail.com> - 2011-10-25 01:38 -0700
Re: Windows: when the Session deleted/resources released? "Laurenz Albe" <invite@spam.to.invalid> - 2011-10-25 11:54 +0200
Re: Windows: when the Session deleted/resources released? durumdara <durumdara@gmail.com> - 2011-10-25 04:04 -0700
Re: Windows: when the Session deleted/resources released? "Laurenz Albe" <invite@spam.to.invalid> - 2011-10-27 10:12 +0200
Re: Windows: when the Session deleted/resources released? durumdara <durumdara@gmail.com> - 2011-11-02 02:17 -0700
Re: Windows: when the Session deleted/resources released? "Laurenz Albe" <invite@spam.to.invalid> - 2011-11-02 17:02 +0100
Re: Windows: when the Session deleted/resources released? durumdara <durumdara@gmail.com> - 2011-11-03 05:34 -0700
Re: Windows: when the Session deleted/resources released? durumdara <durumdara@gmail.com> - 2011-10-25 08:02 -0700
Re: Windows: when the Session deleted/resources released? Matthew Woodcraft <mattheww@chiark.greenend.org.uk> - 2011-10-25 19:56 +0100
Re: Windows: when the Session deleted/resources released? durumdara <durumdara@gmail.com> - 2011-10-27 00:24 -0700
Re: Windows: when the Session deleted/resources released? Matthew Woodcraft <mattheww@chiark.greenend.org.uk> - 2011-10-27 13:49 +0100
csiph-web