Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

60s delays on W2003 during data transfer [CORE419] #763

Closed
firebird-automations opened this issue Sep 2, 2004 · 12 comments
Closed

60s delays on W2003 during data transfer [CORE419] #763

firebird-automations opened this issue Sep 2, 2004 · 12 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: michalk1 (michalk1)

Attachments:
DelayTest.ZIP

SFID: 1021143#⁠
Submitted By: michalk1

I noticed irregular 60 seconds delays during data
transfer operations on Windows 2003 server hosting FB
1.5.1 SS. The pauses sometimes occure so often that
they make the server unusable as they stop all current
server activity.

After some experiments I was able to isolate the problem
into small testing application. It uses two independent
database connections to one database. One to read
from "source" table, second to write to "destination"
table. Source connection executes SELECT * from
source table, and for every fetched row the destination
connection inserts one row into destination table by
INSERT INTO statement. The database contains no
other tables and the tables contain just one integer
column. The main loop (written in Delphi using IBX
components) looks like this:

...
SrcSQL.SQL.Add('SELECT * FROM SRCTAB');
SrcSQL.ExecQuery;
DstSQL.SQL.Add('INSERT INTO DSTTAB (ID) VALUES
(:ID)');
...
RecNo:=0;
while not SrcSQL.Eof do
begin
...
DstSQL.Params[0].AsInteger:=RecNo;
DstSQL.ExecQuery;
SrcSQL.Next;
Inc(RecNo);
end;

The loop transfers 10000 rows, then commits the data.
The loop is executed repeatedly, the destination table is
cleaned after every cycle.
Now, at random moments the application freezes after
executing the DstSQL.ExecQuery command for one
minute. The delay's length is very precise, it never takes
less than 59 s or more than 60 s.

Here are some conditions that must be met to cause the
delay (fine-tuned to show the delay as soon as possible)
- test apllication runs on the server's machine using
localhost loopback
- OS is Windows 2003 Server (I can't reproduce the
problem on another OS)
- there are no other applications or clients attached to
the DB server during the test
- application opens two independent database
connections. The connections may or may not point to
the same database. When I use just one connection,
the delay never occures.
- frequence of pauses seems to be dependent on
system setting of "Application response priority" (Control
Panel ->
System -> Advanced -> Performance Options) -
"Background services" vs "Applications"

Some clues:
- DB server: FB 1.5.1 SS (also tested on previous
versions and RCs, the problem persists)
- Forced writes: enabled
- Connection type: TCP/IP local loop (localhost)
- DB file extension: FDB
- FB configuration file: default settings (no change)
- Processor: different machines with P III or P IV
processors (with or without HT)
- Database size: 2 MB
- Test application is single threaded

I asked in support list last year, but no solution was
found.
I attach zipped testcase with instructions how to
reproduce the problem.

Regards,
Michal

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2005-09-01 13:16
Sender: michalk1
Logged In: YES
user_id=1115046

Confirmed, FB 2.0 Alpha works ok. Btw, the delays (in FB
1.5 and previous versions) are not caused just by HT as i read
in some comments. I'm able to demonstrate them even on a
non HT machine with Win 2003 OS. HT just makes them
appear more often and also on different Windows versions (at
least XP). Any idea where the 60 seconds delays come from
or how to eliminate them in FB 1.5 ?

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2005-08-31 20:25
Sender: dimitr
Logged In: YES
user_id=61270

As reported by other testers, the issue disappears on FB
2.0. Please confirm.

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2004-10-14 17:05
Sender: shibanov
Logged In: YES
user_id=1139248

Problem isn't depending from Sweep Interval - I've reproduced
it with Sweep Interval = 20000 and with Sweep Interval = 0.

I want note, that the problem can't be reproduced on Classic.
And one more detail - if I connect to _any_ database on this
server while application is "freezed" and fetch some data, than
process "unfreez" for some time.

The problem occure more often if this firebird.conf is used
(instead of default settings):
http://download.metadataforge.com/download/firebird.conf.zip

In my case I use two databases to reproduce proplem. I havn't
seen this bug-report and made my test application for this
proplem. I'll send it by request.

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2004-09-17 08:29
Sender: michalk1
Logged In: YES
user_id=1115046

All settings are at their default values - Sweep Interval is
20000.
You may try the attached testcase - it creates its own test
database. Btw., I tried to commit more often, but it doesn't
help even if I commit every inserted record.

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2004-09-17 03:59
Sender: seanleyne
Logged In: YES
user_id=71163

What is the value Sweep Interval database setting?

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

Reopened just to add attachment.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Closed [ 6 ] => Reopened [ 4 ]

assignee: Dmitry Yemanov [ dimitr ]

SF_ID: 1021143 =>

resolution: Fixed [ 1 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

Delphi sources of test case application

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Attachment: DelayTest.ZIP [ 10056 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Reopened [ 4 ] => Closed [ 6 ]

resolution: Fixed [ 1 ]

SF_ID: 1021143 =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 10443 ] => Firebird [ 14735 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants