On 7 Jun 2021, at 10:22, 'Björn Pedersen' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:For production usage: start as root.
HiEach time I start Gerrit i get this "warning" :[bin]$ ./gerrit.sh start ./gerrit.sh: line 317: ulimit: open files: cannot modify limit: Operation not permittedIs there something to do ?
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/c28c4fdd-cdc2-4760-83cf-a7d5985b3accn%40googlegroups.com.
317 ulimit -n $GERRIT_FDS ; # open files
Which on my Debian defaults to 1024 and is the default limit hardcoded in pam_limits. You should be able to raise it on the system for the gerrit user via a /etc/security/limits.d/gerrit.conf that would have something such as:
gerrit - nofile 9999
Or alternatively start Gerrit with systemd which has support to set the file limit via Service.LimitNOFile. Our unit (stripped of various irrelevant JVM flags) is:
[Unit]
Description=Gerrit code review tool
After=network.target
[Service]
User=gerrit
Group=gerrit
Type=simple
EnvironmentFile=/etc/default/gerrit
ExecStart=/usr/lib/jvm/java-11-openjdk-amd64/bin/java -jar
/var/lib/gerrit2/review_site/bin/gerrit.war daemon -d
/var/lib/gerrit2/review_site
KillSignal=SIGINT
# NOFILE : GERRIT_FDS, determined by "core.packedGitOpenFiles"
in the script
LimitNOFILE=20000
Restart=always
RestartSec=2s
[Install]
WantedBy=multi-user.target
-- Antoine "hashar" Musso Release Engineering