asp.net-core - 使用neo4j数据库访问API时,30000毫秒内重试6次失败
问题描述
最初,当我使用 neo4j 数据库访问 API 时,它可以正常工作,但一段时间后,当我尝试访问 API 时,出现以下错误:
Failed after retried for 6 times in 30000 ms. Make sure that your database is online and retry again.
我在 API 中使用下面的代码进行数据库连接:
var neo4jClient = new BoltGraphClient(new Uri(connectionUrl), Username, Password);
neo4jClient.ConnectAsync();
services.AddSingleton<IBoltGraphClient>(neo4jClient);
解决方案
这里没有真正的编码答案,唯一让我印象深刻的是在通话await
之前缺乏。neo4jClient.ConnectAsync()
除此之外,您需要检查连接、网络等。如果它是本地的 - 那我不确定 - 我想你可以尝试/抓住这个 - 但这就是幕后发生的事情。
推荐阅读
- elasticsearch - 在 Elasticsearch 中使用 update_by_query API 更新文档或插入
- python - Seaborn:数据上方辅助轴的网格线(具有不同的刻度)
- python - 从另一个数据帧中查找和替换数据帧
- windows - 如何使用批处理文件连接到 Oracle DB
- outlook - 标记为垃圾邮件的电子邮件签名
- amazon-ecs - 无法使用 docker hub 私有存储库映像注册 ecs 任务
- java - 如何在testng的单独java文件中使用@BeforeTest
- ios - 是否可以禁用应用程序中的其他应用程序
- html - 缩小到下拉菜单时的导航栏问题
- reactjs - 循环内组件的单个实例上的条件类