Endless saving of CoreData Context
- by Robert
Sometimes I noticed that a 'save:' operation an a ManagedObjectContext never returns and consumes 100% CPU.
I'm using an SQL Store in a GarbageCollected environment (Mac OS X 10.6.3). The disk activity shows about 700 KB/s writing. While having a look at the folder that contains the sqlite database file the "-journal" file appears and disappears, appears and disappears, ...
This is part of the call graph from the process analysis:
2203 -[NSManagedObjectContext save:]
1899 -[NSPersistentStoreCoordinator(_NSInternalMethods) executeRequest:withContext:]
1836 -[NSSQLCore executeRequest:withContext:]
1836 -[NSSQLCore saveChanges:]
1479 -[NSSQLCore performChanges]
...
335 -[NSSQLCore recordChangesInContext:]
...
20 -[NSSQLCore rollbackChanges]
...
2 -[NSSQLCore prepareForSave:]
...
62 -[NSPersistentStoreCoordinator(_NSInternalMethods) _checkRequestForStore:originalRequest:andOptimisticLocking:]
...
1 -[NSPersistentStore(_NSInternalMethods) _preflightCrossCheck]
...
184 -[NSMergePolicy resolveConflicts:]
...
120 -[NSManagedObjectContext(_NSInternalChangeProcessing) _prepareForPushChanges:]
...
Everything a happening in the main GUI thread.
Any ideas what I can to do to resolve the problem?