Replace the fedmsg-gateway service file with our own to do resource limits the systemd way.
This commit is contained in:
parent
0db611db0b
commit
532004d77b
3 changed files with 18 additions and 55 deletions
14
roles/fedmsg/gateway/files/fedmsg-gateway.service
Normal file
14
roles/fedmsg/gateway/files/fedmsg-gateway.service
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Outbound fedmsg gateway
|
||||||
|
After=network.target
|
||||||
|
Documentation=http://fedmsg.readthedocs.org/en/latest/commands/
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/fedmsg-gateway
|
||||||
|
Type=simple
|
||||||
|
User=fedmsg
|
||||||
|
Group=fedmsg
|
||||||
|
LimitNOFILE=160000
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -1,53 +0,0 @@
|
||||||
# /etc/security/limits.conf
|
|
||||||
#
|
|
||||||
#Each line describes a limit for a user in the form:
|
|
||||||
#
|
|
||||||
#<domain> <type> <item> <value>
|
|
||||||
#
|
|
||||||
#Where:
|
|
||||||
#<domain> can be:
|
|
||||||
# - an user name
|
|
||||||
# - a group name, with @group syntax
|
|
||||||
# - the wildcard *, for default entry
|
|
||||||
# - the wildcard %, can be also used with %group syntax,
|
|
||||||
# for maxlogin limit
|
|
||||||
#
|
|
||||||
#<type> can have the two values:
|
|
||||||
# - "soft" for enforcing the soft limits
|
|
||||||
# - "hard" for enforcing hard limits
|
|
||||||
#
|
|
||||||
#<item> can be one of the following:
|
|
||||||
# - core - limits the core file size (KB)
|
|
||||||
# - data - max data size (KB)
|
|
||||||
# - fsize - maximum filesize (KB)
|
|
||||||
# - memlock - max locked-in-memory address space (KB)
|
|
||||||
# - nofile - max number of open files
|
|
||||||
# - rss - max resident set size (KB)
|
|
||||||
# - stack - max stack size (KB)
|
|
||||||
# - cpu - max CPU time (MIN)
|
|
||||||
# - nproc - max number of processes
|
|
||||||
# - as - address space limit (KB)
|
|
||||||
# - maxlogins - max number of logins for this user
|
|
||||||
# - maxsyslogins - max number of logins on the system
|
|
||||||
# - priority - the priority to run user process with
|
|
||||||
# - locks - max number of file locks the user can hold
|
|
||||||
# - sigpending - max number of pending signals
|
|
||||||
# - msgqueue - max memory used by POSIX message queues (bytes)
|
|
||||||
# - nice - max nice priority allowed to raise to values: [-20, 19]
|
|
||||||
# - rtprio - max realtime priority
|
|
||||||
#
|
|
||||||
#<domain> <type> <item> <value>
|
|
||||||
#
|
|
||||||
|
|
||||||
#* soft core 0
|
|
||||||
#* hard rss 10000
|
|
||||||
#@student hard nproc 20
|
|
||||||
#@faculty soft nproc 20
|
|
||||||
#@faculty hard nproc 50
|
|
||||||
#ftp hard nproc 0
|
|
||||||
#@student - maxlogins 4
|
|
||||||
|
|
||||||
@fedmsg hard nofile 170000
|
|
||||||
@fedmsg soft nofile 160000
|
|
||||||
|
|
||||||
# End of file
|
|
|
@ -20,8 +20,10 @@
|
||||||
notify:
|
notify:
|
||||||
- restart fedmsg-gateway
|
- restart fedmsg-gateway
|
||||||
|
|
||||||
- name: bump fs limits
|
- name: bump fs limits by installing our own systemd service file
|
||||||
copy: src=limits.conf dest=/etc/security/limits.conf
|
copy: >
|
||||||
|
src=fedmsg-gateway.service
|
||||||
|
dest=/usr/lib/systemd/system/fedmsg-gateway.service
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- fedmsg/gateway
|
- fedmsg/gateway
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue