2015-10-06 22 views
0

由於iOS的9我們在應用程序複製了這些巨大的延遲處理該請求回/啓動應用精細,視圖控制器和一切。我能夠與應用程序交互,但在某些情況下,它不會加載所有請求。它只發生在iOS9設備中(不管它是否針對iOS8或iOS9構建)。請求延遲高達iOS9有時1分鐘nsurlstoraged - NSURLStorageURLCacheDB deleteAllResponses數據庫鎖定

,我們已經是這個記錄每個發生這種情況時反覆唯一的線索:

Oct 2 15:21:15 Hurts-iPhone ondemandd[1364] <Error>: -[ODRBackgroundMaintenance startBackgroundMaintenanceOperations] 
Oct 2 15:21:20 Hurts-iPhone nsurlstoraged[107] <Warning>: ERROR: NSURLStorageURLCacheDB deleteAllResponses: dbConnection=0x188dd200 DB=/private/var/mobile/Containers/Data/Application/5CD0BB06-3EF9-4A76-B5AF-25C86A8FA2AC/Library/Caches/com.company.bundleId/Cache.db Delete from cfurl_cache_blob_data failed:database is locked ErrCode: 5. 
Oct 2 15:21:31 Hurts-iPhone nsurlstoraged[107] <Warning>: ERROR: NSURLStorageURLCacheDB deleteAllResponses: dbConnection=0x188dd200 DB=/private/var/mobile/Containers/Data/Application/5CD0BB06-3EF9-4A76-B5AF-25C86A8FA2AC/Library/Caches/com.company.bundleId/Cache.db Delete from cfurl_cache_receiver_data failed:database is locked ErrCode: 5. 
Oct 2 15:21:31 Hurts-iPhone nsurlstoraged[107] <Error>: Error: execSQLStatement:onConnection:toCompletionWithRetry:writeLockHelp - SQL=COMMIT;, error-code=1, error-message=cannot commit - no transaction is active 
Oct 2 15:21:31 Hurts-iPhone nsurlstoraged[107] <Warning>: ERROR: NSURLStorageURLCacheDB deleteAllResponses: dbConnection=0x188dd200 DB=/private/var/mobile/Containers/Data/Application/5CD0BB06-3EF9-4A76-B5AF-25C86A8FA2AC/Library/Caches/com.company.bundleId/Cache.db Commit transaction failed:cannot commit - no transaction is active ErrCode: 1. 
Oct 2 15:21:34 Hurts-iPhone kernel[0] <Notice>: IOAccessoryManager::configureAllowedFeatures: tristar: revoking mask=0xffff 
Oct 2 15:21:34 Hurts-iPhone iaptransportd[29] <Warning>: CIapPortAppleIDBus: Auth timer timeout completed on pAIDBPort:0x17d4a4e0, portID:01 downstream port 
Oct 2 15:21:41 Hurts-iPhone nsurlstoraged[107] <Warning>: ERROR: NSURLStorageURLCacheDB deleteAllResponses: dbConnection=0x188dd200 DB=/private/var/mobile/Containers/Data/Application/5CD0BB06-3EF9-4A76-B5AF-25C86A8FA2AC/Library/Caches/com.company.bundleId/Cache.db Vacuum failed:database is locked ErrCode: 5 

我和相同的行爲周圍滿眼看到的都是在Mac OS X和使用本地應用(郵件唯一的情況下, iTunes等),這讓它變得更加奇怪。

延遲的要求似乎可以減輕這些案件。這絕對是iOS上的一個僵局,但我們很樂意走到這條路上。

回答

0

我終於找到了解決方法除去在一開始應用的緩存。我們不會密集使用應用程序緩存,因此在我們的情況下,它在性能方面不是一個昂貴的解決方案。刪除緩存的方法是在應用程序的開始處設置空緩存

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 

NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:0 
                diskCapacity:0 
                 diskPath:nil]; 
[NSURLCache setSharedURLCache:URLCache]; 

我希望這對其他人有幫助。

在此期間有是對蘋果方面的一些開放的bug報告。當我得到更多關於它的信息時,我會在這裏發佈。

0

我也遇到了同樣的問題。但在這種情況下,我的應用程序因消息應用程序崩潰 - 'UIKitApplication:com.companyname.com [0xrhel]'被jetsam終止。

+0

您是否找到任何解決方案? – edsancha

-1

我刪除了cache.db,它似乎確定


我不認爲這是一個很好的解決方案,但它的工作原理。