2015-10-06 131 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,它似乎确定


我不认为这是一个很好的解决方案,但它的工作原理。