每隔一段时间,我就开始看到以下异常.我不确定如何解决它,或者为什么应用程序认为它正在停止.解决它的唯一方法是重新启动应用程序.这个错误的最佳做法是什么?这个错误的原因是什么?
System.OperationCanceledException: The agent is stopped or has been stopped, no additional provocateurs can be created.
at GreenPipes.Caching.Internals.NodeValueFactory`1.<CreateValue>d__7.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at offset 12
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task task) at offset 38
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task) at offset 46
at GreenPipes.Caching.Internals.NodeTracker`1.<AddNode>d__38.MoveNext()
Run Code Online (Sandbox Code Playgroud) 我使用AddHttpClient() 依赖注入将命名客户端添加到瞬态服务中。有时,当我netstat -a在服务器上执行时,我会看到许多连接打开,状态为TIME_WAIT或CLOSE_WAIT。我相信这些连接占用了太多的资源,以至于其他TCP连接无法运行。这可能吗?有没有办法阻止这些,安全吗?
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
ServicePointManager.DefaultConnectionLimit = 200;
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
services.AddHttpClient(FirebaseService.FirebaseServiceClient, ConfigureFirebaseClient);
services.AddTransient<FirebaseService>();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void …Run Code Online (Sandbox Code Playgroud) 我正在运行一个不能更改任何规范的Web服务。我想在Kubernetes上将活动性探针与HTTP POST一起使用。我找不到任何可用的东西。我对busybox和netcat的所有努力都失败了。
有解决方案吗?是否可以从任何Linux发行版构建自定义活动探针?