Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/117.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在iOS9 nsurlstoraged-NSURLStorageURLCacheDB deleteAllResponses数据库中,请求有时会延迟1分钟_Ios_Deadlock_Ios9_Nsurl_Nsurlcache - Fatal编程技术网

在iOS9 nsurlstoraged-NSURLStorageURLCacheDB deleteAllResponses数据库中,请求有时会延迟1分钟

在iOS9 nsurlstoraged-NSURLStorageURLCacheDB deleteAllResponses数据库中,请求有时会延迟1分钟,ios,deadlock,ios9,nsurl,nsurlcache,Ios,Deadlock,Ios9,Nsurl,Nsurlcache,自iOS 9以来,我们一直在复制应用程序处理回请求/应用程序启动良好、查看控制器和所有方面的巨大延迟。我可以与应用程序交互,但在某些情况下,它无法加载所有请求中的某些请求。它只发生在iOS9设备中(它是针对iOS8还是iOS9构建的并不重要) 我们所掌握的唯一线索是,每次发生这种情况时,日志都会重复: Oct 2 15:21:15 Hurts-iPhone ondemandd[1364] <Error>: -[ODRBackgroundMaintenance startBackgro

自iOS 9以来,我们一直在复制应用程序处理回请求/应用程序启动良好、查看控制器和所有方面的巨大延迟。我可以与应用程序交互,但在某些情况下,它无法加载所有请求中的某些请求。它只发生在iOS9设备中(它是针对iOS8还是iOS9构建的并不重要)

我们所掌握的唯一线索是,每次发生这种情况时,日志都会重复:

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
10月2日15:21:15按需安装iPhone[1364]:-[ODRBackground维护开始Background维护操作]
10月2日15:21:20:00:00:00 nsurlstoraged[107]:错误:NSURLStorageURLCacheDB deleteAllResponses:dbConnection=0x188dd200 DB=/private/var/mobile/Containers/Data/Application/5CD0BB06-3EF9-4A76-B5AF-25C86A8FA2AC/Library/Caches/com.company.bundleId/Cache.DB从cfurl\u Cache\u blob\u数据删除失败:数据库被锁定错误代码:5。
10月2日15:21:31:31:nsurlstoraged[107]:错误:NSURLStorageURLCacheDB deleteAllResponses:dbConnection=0x188dd200 DB=/private/var/mobile/Containers/Data/Application/5CD0BB06-3EF9-4A76-B5AF-25C86A8FA2AC/Library/Caches/com.company.bundleId/Cache.DB从cfurl\u Cache\u receiver\u数据删除失败:数据库被锁定错误代码:5。
Oct 2 15:21:31:nsurlstoraged[107]:错误:execSQLStatement:onConnection:toCompletionWithRetry:writeLockHelp-SQL=COMMIT;,错误代码=1,错误消息=无法提交-没有活动的事务
10月2日15:21:31:00:00:00 nsurlstoraged[107]:错误:NSURLStorageURLCacheDB deleteAllResponses:dbConnection=0x188dd200 DB=/private/var/mobile/Containers/Data/Application/5CD0BB06-3EF9-4A76-B5AF-25C86A8FA2AC/Library/Caches/com.company.bundleId/Cache.DB提交事务失败:无法提交-没有事务处于活动状态错误代码:1。
10月2日15:21:34:iPhone内核[0]:IOAccessoryManager::configureAllowedFeatures:tristar:revoking mask=0xffff
10月2日15:21:34:IapTransport[29]:CIapPortAppleIDBus:PaidPort:0x17d4a4e0上的验证计时器超时已完成,portID:01下游端口
10月2日15:21:41:41:nsurlstoraged[107]:错误:NSURLStorageURLCacheDB deleteAllResponses:dbConnection=0x188dd200 DB=/private/var/mobile/Containers/Data/Application/5CD0BB06-3EF9-4A76-B5AF-25C86A8FA2AC/Library/Caches/com.company.bundleId/Cache.DB真空失败:数据库被锁定错误代码:5
我在MacOSX上见过的唯一一个有同样行为的例子是使用本机应用程序(邮件、iTunes等),这让它变得更加奇怪


推迟请求似乎可以缓解这些情况。这肯定是iOS上的一个僵局,但我们很想走这条路。

我也遇到了同样的问题。但在本例中,我的应用程序出现崩溃,消息应用程序--“UIKitApplication:com.companyname.com[0xrhel]”被jetsam杀死。

我删除了cache.db,看起来还可以



我不认为这是一个好的解决方案,但它是有效的。

我终于找到了一个解决方案,从应用程序中删除缓存。我们不会大量使用应用程序缓存,因此,在我们的案例中,就性能而言,它不是一个昂贵的解决方案。删除缓存的方法是在应用程序启动时设置空缓存

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

NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:0
                                                     diskCapacity:0
                                                         diskPath:nil];
[NSURLCache setSharedURLCache:URLCache];
我希望这对其他人有帮助


与此同时,苹果方面也有一些公开的bug报告。当我得到更多关于它的信息时,我会把它贴在这里。

你找到解决办法了吗?