Skip to main content

Restart an ASP.NET Core service with a short safety checklist

· 7 min read
OmmLabs · Sponsored by Omm Rudraksha

A restart can be the right operation, but it is useful only when you know which service you are restarting and what result you expect. A green command result alone cannot establish that customers can use the application again.

This guide follows a deliberate restart of demo-web.service in a disposable Ubuntu environment. It explains the dashboard's confirmation and result flow, how to gather a baseline, and what to do when the result is unclear.

Decide why a restart is needed​

Write down the symptom and the proposed reason for restarting. Examples include applying an already authorized deployment or recovering a service after an identified transient failure.

If you have no evidence about the cause, begin with status and logs. Repeated restarts can erase the useful context of a short-lived failure, replace a PID you were investigating or create an additional interruption.

Define the desired outcome in observable terms. “The canonical unit reaches its expected state, its startup error stops recurring, and the public endpoint passes a representative check” is more useful than “click restart until it looks green.”

Confirm the exact target​

In Applications, verify the display name, environment and canonical unit name together. Similar blue, green, staging and production names deserve an explicit second look.

Confirm that the entry belongs to the site or worker under investigation. A public hostname is not itself a systemd identity. If the mapping is uncertain, ask the owner before taking action.

The registry's port and path are metadata. They can help identify the target, but the management action is directed at the registered unit. Read the application guide if an entry needs correcting before the maintenance operation.

Consider the effect beyond the one process​

A web application may depend on a shared database, cache, identity provider or proxy. Its users may have in-flight requests, and a worker may be processing a job.

The service unit itself can define ordering and relationships with other units. Your server owner should understand those relationships before approving control.

For this walkthrough, use a disposable sample service with a known owner and a simple endpoint. The article is a maintenance exercise, not blanket authorization to restart services on a shared production host.

Capture a small baseline​

Before confirming the operation, record the current service state, main PID, available memory and approximate time. Open recent logs and note the last meaningful failure or successful startup message.

Check the configured public URL separately. Capture the actual status and time rather than assuming the website failed because the process looks unhealthy.

A baseline makes the follow-up interpretable. If the public endpoint already worked before maintenance, you should know whether it remains available. If a request failed beforehand, you can compare the same path afterwards instead of testing an unrelated page.

Check that the operation is authorized​

The dashboard uses the Ubuntu account's existing permissions. A successful SSH sign-in does not guarantee permission to restart every service.

If a prior action returned permission denied, follow the server owner's policy instead of trying increasingly broad commands. The permissions guide explains the relationship between the local app and the remote account.

The dashboard's bounded commands and registry checks reduce accidental input freedom, but they do not replace responsibility for the target service. Keep the permission question resolved before the maintenance window begins.

Read and use the confirmation​

Choose Restart for the intended application. Read the confirmation, including its application name and temporary availability impact.

Cancel once during a lab exercise to understand that path. A cancellation should leave the service unchanged. Then repeat the exercise only when you actually intend to perform the restart.

After confirming, wait for the operation result. The interface prevents accidental repeated requests during an active operation, and the application coordinates conflicting management changes. Opening another tab is not a useful way to accelerate a service that is still starting.

Understand what the result describes​

The dashboard reports the command's actual outcome and refreshes the unit status. This is different from reporting success merely because it accepted a button click.

A systemd restart normally involves stopping and starting the unit. Its exact effects depend on the service and relationships already configured on the host. The systemctl restart documentation describes that operation.

For product-specific execution and coordination details, read the management implementation. Match your interpretation to the source revision in use.

Verify service startup after the command​

Read the refreshed state and inspect recent journal messages. A new PID can support the observation that a process was replaced, but PID change alone is not an application readiness test.

Look for the expected startup stage and the absence of a repeated failure loop. Give the application the time its normal startup requires. Avoid turning a polling interval into a promise about recovery speed.

If the unit is active but the application keeps logging a dependency failure, treat that as a separate unresolved condition. Record what is actually working rather than compressing all layers into a single “restarted successfully” statement.

Verify the public endpoint independently​

Use Website Health to check the configured public address after the operation. Note its response code, response time and check timestamp.

A public request can still fail because of Nginx, DNS, TLS or application routing. Conversely, a cached or shallow success response does not validate every database-backed feature.

For an authorized lab test, include one representative application function whose result matters to the maintenance task. Keep it read-only when possible. The dashboard does not log into the application on your behalf or establish that all user journeys recovered.

Handle a timeout by inspecting first​

A timeout means that the client stopped waiting within its bound. It does not, by itself, prove that no remote work happened.

The unit can still have an active job or be transitioning. Read its actual state and current logs before considering another operation. Record the time at which the original request was made.

If the result remains ambiguous, involve the server operator with the target unit, sanitized error, timestamps and observed state. A second restart should follow a new decision based on evidence, not a reflex response to the first request's timeout message.

Keep the audit record useful​

Open Audit History and locate the restart entry. Review the target, action, signed-in account, timestamp and result.

Add a short maintenance note outside the dashboard if your team needs to connect the action to a ticket or deployment. Include the before-and-after observations and any remaining problem.

Audit history is local operational data and should remain private. Share a minimal sanitized excerpt when reporting a defect. The audit guide explains retention scope and why an independent copy may be needed for organizational requirements.

End with a specific recovery statement​

A useful completion note identifies the service and environment, the one operation performed and the evidence checked afterwards. It also states any remaining issue explicitly.

In a lab, you should be able to demonstrate a cancelled confirmation, an authorized restart, a real command result and a separate website check. For failure exercises, distinguish denied permission, command timeout and application startup error.

That produces a repeatable maintenance habit: identify, inspect, confirm, observe and record. The interface makes the operation easier to reach; the surrounding evidence makes the result understandable.