[SERVER-10591] Database is locked (or freezed) when database executes a Datafilesync Created: 21/Aug/13  Updated: 16/Nov/21  Resolved: 10/Jun/14

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 2.4.5
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: David Verdejo Assignee: Mark Benvenuto
Resolution: Duplicate Votes: 0
Labels: datafilesync
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

rsaudit:PRIMARY> db.serverBuildInfo()
{
"version" : "2.4.5",
"gitVersion" : "a2ddc68ba7c9cee17bfe69ed840383ec3506602b",
"sysInfo" : "windows sys.getwindowsversion(major=6, minor=1, build=7601,
platform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_49",
"loaderFlags" : "/nologo /LTCG /DEBUG /LARGEADDRESSAWARE /NODEFAULTLIB:M
SVCPRT",
"compilerFlags" : "/TP /nologo /EHsc /W3 /wd4355 /wd4800 /wd4267 /wd4244
/Z7 /errorReport:none /O2 /Oy- /MT /GL",
"allocator" : "system",
"versionArray" : [
2,
4,
5,
0
],
"javascriptEngine" : "V8",
"bits" : 64,
"debug" : false,
"maxBsonObjectSize" : 16777216,
"ok" : 1
}


Attachments: Text File mongo_datafilesync.txt    
Issue Links:
Duplicate
duplicates SERVER-12880 Server pauses on requests every 60 se... Closed
duplicates SERVER-13444 Long locked flush without inserts and... Closed
Operating System: Windows
Steps To Reproduce:

See a DataFileSync on logs and try to make a db.test.find()

Participants:

 Description   

When the database is executing a Datafilesync, I could see on logs that we have a increment in client connections to database. When datafilesync is finished, then the client connections drops to the baseline (see attached file). We see this pattern everytime that a datafilesync line is registered on the log.

I made a test when Datafilesync was in action to recieve one document from a collection (db.test.findOne()), and it took about 10 seconds.

I reviewed the following article:
http://docs.mongodb.org/manual/reference/command/fsync/

And check the following function

serverIsLocked = function () {
var co = db.currentOp();
if (co && co.fsyncLock)

{ return true; }

return false;
}

But when I run this function, I always see that the server is not locked.



 Comments   
Comment by Thomas Rueckstiess [ 04/Apr/14 ]

This was partially addressed by SERVER-7973.

See also related tickets: SERVER-12880, SERVER-13444.

Comment by Daniel Pasette (Inactive) [ 24/Aug/13 ]

Hi David,
The DataFileSync log messages are specifically talking about the time it has taken to flush the memory mapped files to disk. By default this happens every 60s. In this case it took 31185ms to flush 49 files. This is quite a bit longer than normal and usually indicates slow disk performance or very high write throughput.

Generated at Thu Feb 08 03:23:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.