Job for elasticsearch.service failed because the control process exited with error code

so i was misinformed by someone at work and by updating that file with the following command ... it works fine for upgrading.

systemctl edit elasticsearch

[Service]
LimitMEMLOCK=infinity