On 22 Sep 2017 3:57 am, "Bill Shirley" <bshirley@memphis.apirx.biz> wrote:
Have you looked at overriding it in the systemd unit file?

I use this for mariadb (/etc/systemd/system/mariadb.service):
.include /usr/lib/systemd/system/mariadb.service

[Service]
#LimitNOFILE=infinity
LimitNOFILE=65536
LimitMEMLOCK=infinity

Bill


On 9/21/2017 6:55 PM, Peter Boy wrote:
When Fedora used systemV init you could define a specific user for a specific tomcat instance in /etc/systconfig/tomcat-[myinstance] by adding a line TOMCAT_USER=„mytomcat“.

In Fedora 26 with systemd you can define different Tomcat instances but the above mechanism doesn’t work anymore. I checked the starter script and couldn’t identify a way to define an instance specific user.

Well, does anybody know how I can achieve this?


My issue is: If my instances are all executing as the same user I get sometimes an „Too many open files“ error message and the instance stops executing. In RHEL it helps to define separate users per instance. The other instances were not affected by the broken one.



Thanks
Peter


_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-leave@lists.fedoraproject.org


_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-leave@lists.fedoraproject.org


Small side note... don't use .include as it's not recommended and long since deprecated. 

Use a systemd unit override which is the supported way of handling it. 

mkdir /etc/systemd/system/mariadb.service.d

Pop a .conf file in there with the directives you want to override. 

If you do 'systemctl edit <unit_name>' that's how it organises things. 

Back to the question of the OP ... sounds like you are in the perfect area of requirements for a unit template with each tomcat instance from the template and override User in each to make them different and individually controllable.