Troubleshooting
The service keeps restarting
The restart-loop alert and an address that answers with an error, with the usual causes of each.
Updated
Two problems look alike from outside: the service will not stay up, or it stays up but its address answers with an error. The console tells them apart. The first shows an alert on the service's Overview; the second shows nothing, because the service is running.
"The engine keeps restarting this service"
When the process in the container ends on its own twice or more, the service's Overview shows this alert:
The engine keeps restarting this service
It has started and stopped N times. Whatever runs in the container is ending on its own, so nothing answers on its address and a terminal has nothing to attach to. The logs hold what it said before it stopped.
Up to five of the platform's own lines follow, newest first. The state chip can still read Running, because running is what the service was asked to be: the platform keeps starting it again. A deployment can also end with "The deployment finished, but nothing is running." for the same reasons.
Start with the service's Logs tab, which holds what the process printed before it ended, then check the causes below in order.
If none of these explains it, write to support from the console's Support page, with the service picked and the alert's lines in the message: see Support.
The address answers with an error
The service reads Running, there is no restart alert, and yet Visit opens an error page. The usual cause is the port.
Every application starts with Port set to 3000. If your application listens on another port, such as 80 for many web server images or 8080, the platform sends traffic to a port nothing listens on.
Set the port
On the service's Settings tab, set Port to the port your application listens on inside its container, and press Save settings. A running application restarts with it.
Add the domain again if it already existed
A domain keeps the port the service had when the domain was added. If the service already has a domain, open Domains, press Remove domain on it, and add it again with Add domain. A generated domain comes back on the next successful deploy when the service has none; your own domain shows a new TXT record to add under Show DNS records. See Domains.
When Visit is greyed out instead, its label says why. See A domain is stuck.