Question WorldGuard destroying server loading

electronicboy

Administrator
Staff member
Dec 11, 2021
216
10
34
28
you hit a resource limit on the server, you'll need to configure the host to allow more connections, if self hosting see the syslimits config or whatever, if using a host, speak to them
 

JunekCZ

New member
Mar 10, 2022
10
0
1
I run it on my own server at home with great specs, I would say, so I should not have any limitations on my server. Is there some config or something to configure it?
 

electronicboy

Administrator
Staff member
Dec 11, 2021
216
10
34
28
Yes, look into ulimits, generally configured by default through the sysconfig limits in /etc, otherwise, you'll need to google it for whatever OS you're using
 

JunekCZ

New member
Mar 10, 2022
10
0
1
Yes, look into ulimits, generally configured by default through the sysconfig limits in /etc, otherwise, you'll need to google it for whatever OS you're using
I guess I found it.
I am using Debian -> /etc/security/limits.conf

Code:
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - a 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
#        - NOTE: group and wildcard limits are not applied to root.
#          To apply a limit to the root user, <domain> must be
#          the literal username root.
#
#<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 file descriptors
#        - 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
#        - chroot - change root to directory (Debian-specific)
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#root            hard    core            100000
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#ftp             -       chroot          /ftp
#@student        -       maxlogins       4

#
# So I set maxlogins to some value
#

www-user        soft    maxlogins       10000
www-data        soft    maxlogins       10000

www-user is running tests via ssh
www-data is running mc servers web from the console

By connections you mean maxlogins? If so, should be like this.
 

JunekCZ

New member
Mar 10, 2022
10
0
1
The problem was in flags I was using in starting script... I will try to use Aikairs flags that I can, but some parallel flag did the mess I think.
 

electronicboy

Administrator
Staff member
Dec 11, 2021
216
10
34
28
The issue is the number of file you have open, using aikars flags can help in some capacity due to how files in java works, but, you're at the very least close to the limit

the ulimit command will tell you what the current limits are for your user iirc, nofile is the number of open files, maxlogins impact the number of user sessions which can be opened, nothin to do with files
 

JunekCZ

New member
Mar 10, 2022
10
0
1
The issue is the number of file you have open, using aikars flags can help in some capacity due to how files in java works, but, you're at the very least close to the limit

the ulimit command will tell you what the current limits are for your user iirc, nofile is the number of open files, maxlogins impact the number of user sessions which can be opened, nothin to do with files
I have logged to user that is running paper spigot and ran ulimit command but unlimited has been returned. Does this mean that this is not the problem?
 

JunekCZ

New member
Mar 10, 2022
10
0
1
The problem is still occurring. Limits look like this:

Code:
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - a 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
#        - NOTE: group and wildcard limits are not applied to root.
#          To apply a limit to the root user, <domain> must be
#          the literal username root.
#
#<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 file descriptors
#        - 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
#        - chroot - change root to directory (Debian-specific)
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#root            hard    core            100000
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#ftp             -       chroot          /ftp
#@student        -       maxlogins       4

www-user        soft    nofile  100000
www-data        soft    nofile  100000
minecraft       soft    nofile  100000

# End of file

Am I setting small limits, or do you know what is happening?
 

electronicboy

Administrator
Staff member
Dec 11, 2021
216
10
34
28
I'm not 100% on how the limits work, afaik you generally wanna set hard/soft, but you're also generally gonna need to actually look into what resources are being used and such, see lsof, if you've got something using a few dozen file handles, you're probs gonna have to look; no idea how you apply changes to that file either, reboot, or I think that there was a command to apply them but I don'tremember
 

JunekCZ

New member
Mar 10, 2022
10
0
1
I'm not 100% on how the limits work, afaik you generally wanna set hard/soft, but you're also generally gonna need to actually look into what resources are being used and such, see lsof, if you've got something using a few dozen file handles, you're probs gonna have to look; no idea how you apply changes to that file either, reboot, or I think that there was a command to apply them but I don'tremember
I was restarting the server after editing limits. Anyway, I ran the command lsof with sudo to see it all (it was writing me permission denied lines without using sudo anyway) and saw DOZENS of lines written under www-data (the user who starts the mc server).

Should I add bigger number to limits and do you want to see lsof log?
 

electronicboy

Administrator
Staff member
Dec 11, 2021
216
10
34
28
lsof shows the open file handles, if you're hitting the limit, you wanna fix that, increasing the limit will ofc, increase the limit, but, you should probably work out why you have that many, 100k file handles is NOT normal
 

JunekCZ

New member
Mar 10, 2022
10
0
1
Sorry that I was not writing for a while. I had to do work to my school.
Anyway, I tried to figure it out and I don't understand a thing.

Do you know what's written in there?
The file is so big I had to upload it on my server: Link
It starts on line 23 879 and ends on line 131 657

Thank you for your big patience!