On Tue, Apr 18, 2017 at 8:44 PM, Igal @ Lucee.org <[email protected]> wrote:
> I've read about the difference between "forking" and "notify", but am not > sure how it really applies in real life. > > Can someone tell me what would be the consequences of setting Tomcat (or > any Java-based service, for that matter) to Type=notify instead of > Type=forking? Examples I see online use forking but I'm not sure that > that's the right way to go. > Both types depend on the service process actually sending the correct kind of notification once it's ready to work. (This helps systemd avoid starting dependent services too early.) If the notification is not received in ~90 seconds, systemd considers the service failed to start and kills all remaining processes. For example, with Type=forking, systemd expects the main process to "fork into background" (daemonize) once it's ready. Similarly, if you use Type=notify, systemd will wait for "READY=1" to be sent over a Unix socket. Tomcat does not seem to have any code that would implement Type=notify, so if you try to use it, your service will spend its first minute in the 'activating' stage, and get immediately killed afterwards. -- Mantas Mikulėnas <[email protected]>
_______________________________________________ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/systemd-devel
