1

Topic: Rupture of the user connection in 2 hours

Kind time of days!
There is an application written on C#, DBMS Firebird 2.5.7, SuperServer.
After two-hour silence of the client connected to server Firebird, there is a connection rupture. Under silence I mean - the user does nothing in the program within two hours. After at attempt to fulfill any action (for example to write down the information or to save), there is an error about connection rupture: Error reading data from the connection.
From this that dug out: understood in KEEPALIVE, it works if to look on the intercepted packets in Wareshark, KeepAlive happens each two minutes from the server, parameters changed, it does not influence error presence.
It is interesting that rupture is stable exactly in two hours. On interception of packets... In two hours the packet from the server about connection acknowledgement as I think, tag ACK comes, on what the client to it throws an answer packet. Then the CLIENT the first sends a packet with tags ACK and FIN on port 3050 (the 192.168.132.79-client, the 192.168.100.97-server.):
192.168.132.79 192.168.100.97 64388 -> 3050 [ACK] Seq=405 Ack=469 Win=65024 Len=0
192.168.132.79 192.168.100.97 64388 -> 3050 [FIN, ACK] Seq=405 Ack=469 Win=65024 Len=0
And if the port 3050 from the client as I understand is used, it Firebird itself breaks off connection, not OS.
Server OS: Windows Server 2008 R2 Standart. OS of the client: any, on win 7, 8, XP quits the given error.
Prompt that at me not so if there are questions-willingly I will answer. Weighs that after two-hour idle time it is necessary the client . The server empty packets go to the networks everyone 30  on the server Ping th for check of availability of the server, all packets successfully reach and are returned.
I can system operation , help, a week killed on the decision of this question...

2

Re: Rupture of the user connection in 2 hours

nnivanova;
Suspiciously similar on parameter KeepAliveTime in Windows, it by default just 2 hours...

3

Re: Rupture of the user connection in 2 hours

Too so thought, but is not present, I changed it and for 5 mines, and for 2 minutes. And the first FIN goes from the client to the server, instead of . At a forum one read about "all data all acknowledgement and connection are transferred, received is completed by a logical method." Only as it so if the user pushes nothing and was not going to break off connection. The same trouble if to be connected to a DB through IBExpert, two hours - and rupture.

4

Re: Rupture of the user connection in 2 hours

nnivanova where you changed it?

5

Re: Rupture of the user connection in 2 hours

Tactical Nuclear Penguin;
On the server, created . Parameters in razdele:HkEy_LocAl_MachINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters:
KeepAliveTime = 300000.
KeepAliveInterval = 1000
And TcpMaxDataRetransmissions=5
On the client too tried to change, installed on 5 mines, but rupture after two hours again happened

6

Re: Rupture of the user connection in 2 hours

I Give

7

Re: Rupture of the user connection in 2 hours

P.S. I can even with the autograph smile

8

Re: Rupture of the user connection in 2 hours

o_v_a;
Thanks! Under this article also changed parameters.

9

Re: Rupture of the user connection in 2 hours

o_v_a;
Did not help. How I understand, these parameters in the server need to be changed? Or in the client? And same on a case of rupture (loss) of connection on a network. And loss that is not present,  that go stablly.

10

Re: Rupture of the user connection in 2 hours

In Windows parameters keepalive are applied only after reboot, by the way.

11

Re: Rupture of the user connection in 2 hours

o_v_a;
Yes, always rebooted.))

12

Re: Rupture of the user connection in 2 hours

And at you all in  or  what?

13

Re: Rupture of the user connection in 2 hours

P.S.  so it is by default switched on, AFAIK.
Better then dummy-packages send, it is easier.

14

Re: Rupture of the user connection in 2 hours

nnivanova;

o_v_a wrote:

Stack TCP traces the moment of termination of passage of packets between the client and the server, launching timer KEEPALIVE. As soon as the timer reaches values KEEPALIVE_ TIME, stack TCP of the server fulfills the first sample KEEPALIVE. Sample is an empty packet c flag ACK, sent to the client. If on client side everything is all right stack TCP on client side sends an answer packet with flag ACK and stack TCP of the server, receiving the answer, drops timer KEEPALIVE. If the client does not answer sample samples from server side continue to be fulfilled. Their amount is equal KEEPALIVE_ PROBES and they are fulfilled through an interval of time KEEPALIVE_ INTERVAL. If the client did not answer the last sample after one more interval of time KEEPALIVE_ INTERVAL stack TCP of an operating system of the server closes connection and Firebird liberates all resources occupied with service of given connection.

You in the first message resulted only a final chord.
And the previous samples as transit?
Change parameters keepalive on the server on made for tests, for example,
KeepAliveTime = 15000
KeepAliveInterval = 1000
And TcpMaxDataRetransmissions=5
Reboot the server.
Launch the client.
Start .
15 seconds do nothing in the client for purity of experiment, wait a breakaway in even 5 seconds and prepare the traffic on broad gulls .

15

Re: Rupture of the user connection in 2 hours

And, , the question about  acts in film, judging by .

16

Re: Rupture of the user connection in 2 hours

Rustam wrote:

P.S.  so it is by default switched on, AFAIK.
Better then dummy-packages send, it is easier.

The decision for easy perverts smile))

17

Re: Rupture of the user connection in 2 hours

wadman> the Decision for easy perverts 18968142
I do not know, what you there changed (or is simple for entertainment/studying?);
But hundred years already as . Adjustment in a config is.

18

Re: Rupture of the user connection in 2 hours

Only after all here... The Client initiates at you connection closing.
KEEPALIVE here there is nothing.
Whether there are what adjustments on  no inactive open connection in a dial-up of components used by you for operation with Firebird?
You the developer and at you are initial texts of the program?

19

Re: Rupture of the user connection in 2 hours

Rustam wrote:

I do not know, what you there changed (or is simple for entertainment/studying?),

There a wrapper over a client part (spacer) which at idle time pulls the request specified in an ini-file.

20

Re: Rupture of the user connection in 2 hours

you, the weakling... smile Is not present that at more low level to work. smile

21

Re: Rupture of the user connection in 2 hours

And indirectly that adjustments KEEPALIVE do not influence behavior of the program, confirms that fact that the rupture reason - it on client side.
launch on the server or on the client, by the way?
Simply if there was a PHYSICAL rupture and the server on the ACK does not receive from client ACK after an amount of samples the SERVER closes a socket.
In your broad gull by your words connection closing is fulfilled by the client.

22

Re: Rupture of the user connection in 2 hours

So  and on the client is.
As a matter of fact, it is necessary on its client
To put it is less, than on the server.

23

Re: Rupture of the user connection in 2 hours

...

nnivanova wrote:

the Same trouble if to be connected to a DB through IBExpert, two hours - and rupture.

And here it is already interesting...

24

Re: Rupture of the user connection in 2 hours

If  - write the unpretentious program;
Which does the same - a simple TCP-connection c
In parameter KEAPLIVE and  on both ends.
If to go - try  dummypacketinterval.

25

Re: Rupture of the user connection in 2 hours

And there in control of power supplies any  is not present?
Type to fall asleep and disconnect ?.