Open fawdlstty opened 4 years ago
I don't think this is specific to ASP.NET. I think you need to look at the standard input/output/logs/etc to see what's going wrong.
@carlossanlop I would move this to the runtime repo for Process.Start.
I don't think this is specific to ASP.NET too, but it's not standard output
Is it possible the 2nd process is trying to bind to a port that the 1st process still has, and bombing?
_hostApplicationLifetime.StopApplication ();
this code may unbind port and the first restart are success
what should I do? close this issue and reopen from runtime?
Tagging subscribers to this area: @eiriktsarpalis Notify danmosemsft if you want to be subscribed.
Hello @fawdlstty
[Public]
First of all, exposing a public API method for stopping (or crashing) your service can allow some attackers to easily take your service down (imagine that someone writes a script that pings this url in a neverending loop). Please don't do it. (cc @GrabYourPitchforks @bartonjs)
I use this code to restart the server under Linux
What do you use to host your app? Most of the web servers should allow for restarting selected services on demand.
Another question I have is why do you want to restart your app? Is it because it has entered a faulty state? Have you considered implementing a Fail Fast approach and configure your web server to reboot the app after every failure?
Thanks, Adam
Another question I have is why do you want to restart your app?
Called by Webhook and used for continuous deployment, the address is normally so complex that there is almost no vulnerability. The software is very small and wants to be as simple as possible, so daemons and docker are not used.
What do you use to host your app?
Hosting mode is Kestrel.
(ASP.Net Core) new process to create new process failed
I use this code to restart the server under Linux, the effect is always, the first time to create successfully and exit itself, the second time (new process) to create failed and exit itself, what is the cause of this problem, how to fix?
General
centos7.5 .net core 3.1 (current latest version) independent publish