Application as Service

Hi Team,

I’ve been trying to configure application as service as per the topic services.
But after all, I unable to start the service and if see the status of my app service, below is the error, in sys logs no error found, please anybody assist on this.

root@ip-172-31-48-224:/var/log# systemctl status my_app
● my_app.service - My first python web application
Loaded: loaded (/etc/systemd/system/my_app.service; disabled; vendor preset: enabled)
Active: inactive (dead)

May 07 02:30:35 ip-172-31-48-224 systemd[1]: my_app.service: Service hold-off time over, scheduling restart.
May 07 02:30:35 ip-172-31-48-224 systemd[1]: my_app.service: Scheduled restart job, restart counter is at 5.
May 07 02:30:35 ip-172-31-48-224 systemd[1]: Stopped My first python web application.
May 07 02:30:35 ip-172-31-48-224 systemd[1]: my_app.service: Start request repeated too quickly.
May 07 02:30:35 ip-172-31-48-224 systemd[1]: my_app.service: Failed with result ‘start-limit-hit’.
May 07 02:30:35 ip-172-31-48-224 systemd[1]: Failed to start My first python web application.
May 07 02:31:00 ip-172-31-48-224 systemd[1]: Started My first python web application.
May 07 02:31:00 ip-172-31-48-224 python3[2920]: Hello World
May 07 02:35:04 ip-172-31-48-224 systemd[1]: Started My first python web application.
May 07 02:35:04 ip-172-31-48-224 python3[3090]: Hello World

My service file looks like

root@ip-172-31-48-224:~# cat /etc/systemd/system/my_app.service
[Unit]
Description=My first python web application

[Service]
ExecStart= /usr/bin/python3 /public/file.py
Restart=always

[Install]
WantedBy=multi-user.target

What’s in file.py?