Valandur / Web-API

RESTful web server for Minecraft Sponge including an admin panel
https://valandur.github.io/Web-API/
MIT License
66 stars 17 forks source link

Constant Timeouts #88

Open sfxworks opened 6 years ago

sfxworks commented 6 years ago

Features that worked before are suddenly timing out on a new server with nobody on and with 20 tps...

Randomly getting request timeout exceeded API errors...

[10:23:10] [qtp850058231-77/WARN] [webapi]: 68.10.207.127 has exceeded the rate limit when requesting /api/info/stats
[10:23:10] [qtp850058231-78/WARN] [webapi]: 68.10.207.127 has exceeded the rate limit when requesting /api/servlet
[10:23:11] [qtp850058231-78/WARN] [webapi]: 68.10.207.127 has exceeded the rate limit when requesting /api/servlet
[10:23:16] [qtp850058231-152/WARN] [webapi]: 68.10.207.127 has exceeded the rate limit when requesting /api/info
[10:23:40] [qtp850058231-152/WARN] [webapi]: 68.10.207.127 does not have permission to access /api/history/chat

They keep happening. These were taken 4 minutes ago from writing this but they keep happening. Also my IP is on the include list which is why I can login. Even refreshing the page it randomly works but its randomly having issues..

Possibly relevant chrome logs:

[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
raven.js:1058 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ raven.js:1058
t @ konva.js:9880
_bindContentEvents @ konva.js:10257
___init @ konva.js:9934
Konva.Stage @ konva.js:9924
value @ react-konva.js:387
commitLifeCycles @ react-dom.production.min.js:149
t @ react-dom.production.min.js:158
_ @ react-dom.production.min.js:169
O @ react-dom.production.min.js:168
h @ react-dom.production.min.js:167
d @ react-dom.production.min.js:165
enqueueSetState @ react-dom.production.min.js:108
o.setState @ react.production.min.js:12
t @ index.js:196
(anonymous) @ index.js:206
raven.js:1058 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ raven.js:1058
t @ konva.js:9880
_bindContentEvents @ konva.js:10257
___init @ konva.js:9934
Konva.Stage @ konva.js:9924
value @ react-konva.js:387
commitLifeCycles @ react-dom.production.min.js:149
t @ react-dom.production.min.js:158
_ @ react-dom.production.min.js:169
O @ react-dom.production.min.js:168
h @ react-dom.production.min.js:167
d @ react-dom.production.min.js:165
enqueueSetState @ react-dom.production.min.js:108
o.setState @ react.production.min.js:12
t @ index.js:196
(anonymous) @ index.js:206
raven.js:1058 [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ raven.js:1058
t @ konva.js:9880
_bindContentEvents @ konva.js:10257
___init @ konva.js:9934
Konva.Stage @ konva.js:9924
value @ react-konva.js:387
commitLifeCycles @ react-dom.production.min.js:149
t @ react-dom.production.min.js:158
_ @ react-dom.production.min.js:169
O @ react-dom.production.min.js:168
h @ react-dom.production.min.js:167
d @ react-dom.production.min.js:165
enqueueSetState @ react-dom.production.min.js:108
o.setState @ react.production.min.js:12
t @ index.js:196
(anonymous) @ index.js:206
raven.js:1058 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ raven.js:1058
t @ konva.js:9880
_bindContentEvents @ konva.js:10257
___init @ konva.js:9934
Konva.Stage @ konva.js:9924
value @ react-konva.js:387
commitLifeCycles @ react-dom.production.min.js:149
t @ react-dom.production.min.js:158
_ @ react-dom.production.min.js:169
O @ react-dom.production.min.js:168
batchedUpdates @ react-dom.production.min.js:171
Z @ react-dom.production.min.js:54
Ie @ react-dom.production.min.js:71
r @ raven.js:360
raven.js:1058 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ raven.js:1058
t @ konva.js:9880
_bindContentEvents @ konva.js:10257
___init @ konva.js:9934
Konva.Stage @ konva.js:9924
value @ react-konva.js:387
commitLifeCycles @ react-dom.production.min.js:149
t @ react-dom.production.min.js:158
_ @ react-dom.production.min.js:169
O @ react-dom.production.min.js:168
batchedUpdates @ react-dom.production.min.js:171
Z @ react-dom.production.min.js:54
Ie @ react-dom.production.min.js:71
r @ raven.js:360
raven.js:1058 [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ raven.js:1058
t @ konva.js:9880
_bindContentEvents @ konva.js:10257
___init @ konva.js:9934
Konva.Stage @ konva.js:9924
value @ react-konva.js:387
commitLifeCycles @ react-dom.production.min.js:149
t @ react-dom.production.min.js:158
_ @ react-dom.production.min.js:169
O @ react-dom.production.min.js:168
batchedUpdates @ react-dom.production.min.js:171
Z @ react-dom.production.min.js:54
Ie @ react-dom.production.min.js:71
r @ raven.js:360
main.3dc02ae0.js:1 [Violation] 'readystatechange' handler took 674ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 150ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 75ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 55ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 53ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 52ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 53ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 53ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 55ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 59ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 79ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 56ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 57ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 56ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 57ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 60ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 56ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 60ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 59ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 57ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 78ms
main.3dc02ae0.js:1 [Violation] 'readystatechange' handler took 248ms
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
raven.js:1058 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ raven.js:1058
t @ konva.js:9880
_bindContentEvents @ konva.js:10257
___init @ konva.js:9934
Konva.Stage @ konva.js:9924
value @ react-konva.js:387
commitLifeCycles @ react-dom.production.min.js:149
t @ react-dom.production.min.js:158
_ @ react-dom.production.min.js:169
O @ react-dom.production.min.js:168
h @ react-dom.production.min.js:167
d @ react-dom.production.min.js:165
enqueueSetState @ react-dom.production.min.js:108
o.setState @ react.production.min.js:12
t @ index.js:196
(anonymous) @ index.js:206
raven.js:1058 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ raven.js:1058
t @ konva.js:9880
_bindContentEvents @ konva.js:10257
___init @ konva.js:9934
Konva.Stage @ konva.js:9924
value @ react-konva.js:387
commitLifeCycles @ react-dom.production.min.js:149
t @ react-dom.production.min.js:158
_ @ react-dom.production.min.js:169
O @ react-dom.production.min.js:168
h @ react-dom.production.min.js:167
d @ react-dom.production.min.js:165
enqueueSetState @ react-dom.production.min.js:108
o.setState @ react.production.min.js:12
t @ index.js:196
(anonymous) @ index.js:206
raven.js:1058 [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ raven.js:1058
t @ konva.js:9880
_bindContentEvents @ konva.js:10257
___init @ konva.js:9934
Konva.Stage @ konva.js:9924
value @ react-konva.js:387
commitLifeCycles @ react-dom.production.min.js:149
t @ react-dom.production.min.js:158
_ @ react-dom.production.min.js:169
O @ react-dom.production.min.js:168
h @ react-dom.production.min.js:167
d @ react-dom.production.min.js:165
enqueueSetState @ react-dom.production.min.js:108
o.setState @ react.production.min.js:12
t @ index.js:196
(anonymous) @ index.js:206
raven.js:1058 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ raven.js:1058
t @ konva.js:9880
_bindContentEvents @ konva.js:10257
___init @ konva.js:9934
Konva.Stage @ konva.js:9924
value @ react-konva.js:387
commitLifeCycles @ react-dom.production.min.js:149
t @ react-dom.production.min.js:158
_ @ react-dom.production.min.js:169
O @ react-dom.production.min.js:168
batchedUpdates @ react-dom.production.min.js:171
Z @ react-dom.production.min.js:54
Ie @ react-dom.production.min.js:71
r @ raven.js:360
raven.js:1058 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ raven.js:1058
t @ konva.js:9880
_bindContentEvents @ konva.js:10257
___init @ konva.js:9934
Konva.Stage @ konva.js:9924
value @ react-konva.js:387
commitLifeCycles @ react-dom.production.min.js:149
t @ react-dom.production.min.js:158
_ @ react-dom.production.min.js:169
O @ react-dom.production.min.js:168
batchedUpdates @ react-dom.production.min.js:171
Z @ react-dom.production.min.js:54
Ie @ react-dom.production.min.js:71
r @ raven.js:360
raven.js:1058 [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ raven.js:1058
t @ konva.js:9880
_bindContentEvents @ konva.js:10257
___init @ konva.js:9934
Konva.Stage @ konva.js:9924
value @ react-konva.js:387
commitLifeCycles @ react-dom.production.min.js:149
t @ react-dom.production.min.js:158
_ @ react-dom.production.min.js:169
O @ react-dom.production.min.js:168
batchedUpdates @ react-dom.production.min.js:171
Z @ react-dom.production.min.js:54
Ie @ react-dom.production.min.js:71
r @ raven.js:360
main.3dc02ae0.js:1 [Violation] 'readystatechange' handler took 674ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
[Violation] 'requestAnimationFrame' handler took <N>ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 150ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 75ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 55ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 53ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 52ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 53ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 53ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 55ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 59ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 79ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 56ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 57ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 56ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 54ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 57ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 60ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 56ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 60ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 59ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 57ms
main.3dc02ae0.js:1 [Violation] 'requestAnimationFrame' handler took 78ms
main.3dc02ae0.js:1 [Violation] 'readystatechange' handler took 248ms
Valandur commented 6 years ago

Can you send me your users.conf file? Please remove the password in it for security. Also the permissions.conf file would be useful. You can also replace any sensitive information in there before posting it. Thank you!

sfxworks commented 6 years ago

No problem. See below. Thanks!

[root@mc-server-dev webapi]# cat user.conf
users {
    quantomworks {
        password="[omitted]"
        permissions="*"
    }
}
# Config file version, used to update correctly
version=1
[root@mc-server-dev webapi]# cat permissions.conf
# The access control origin header that is sent with each request. This is useful if you want to prevent CORS, but remember that it must at least include the server where the AdminPanel is running
accessControlOrigin="*"
# The servers which are allowed to pass the X-Forwarded-For header indicating that they are forwarding a request for a client and are themselves a proxy
allowedProxies=[
    "127.0.0.1"
]
# Add the IP addresses that are NOT allowed to connect to the Web-API to this list
blacklist=null
# These are the default permissions that a client without a key receives
default {
    # All the valid permissions are listed on the redoc endpoint. You can also use the "*" to grant access to all endpoints. Check GitHub for more information about permissions _EXAMPLE_
    permissions {
        info="*"
    }
    # The rate limit specifies how many operations per second a client with no key can execute
    rateLimit=10
}
# This is an array of keys, defining which keys give access to which endpoints.
keys=[
    {
        # Set to true to enable this permission. Remember to change the key to something secure first
        enabled=false
        # The key can be any token/password, but should probably be randomly generated and 16 or more characters long.
        key=USER
        # The permissions array accepts the same permissions as the default permissions array above.
        permissions {
            cmd {
                "*"=true
            }
            history {
                "*"=true
            }
            info {
                "*"=true
            }
            player {
                "*"=true
            }
            plugins {
                "*"=true
            }
            world {
                "*"=true
            }
        }
        # The number of operations per second that a client with this key can execute
        rateLimit=100
    },
    {
        # Set to true to enable this permission. Remember to change the key to something secure first
        enabled=false
        # The key can be any token/password, but should probably be randomly generated and 16 or more characters long.
        key=ADMIN
        # The permissions array accepts the same permissions as the default permissions array above.
        permissions {
            "*"=true
        }
        # No rate limit or zero = unlimited requests
        rateLimit=0
    }
]
# Set this to true to enable the blacklist, false to turn it off
useBlacklist=false
# Set this to true to enable the whitelist, false to turn it off
useWhitelist=true
# Config file version, used to update correctly
version=5
# Add IP address that are allowed to connect to the Web-API to this list
whitelist=[
    "127.0.0.1",
    "68.10.207.127"
]
Valandur commented 6 years ago

I can't seem to reproduce this. What version of Web-API are you using? And when exactly does these errors show up? Just when you're viewing the AdminPanel in general? Or when you're trying to login. Also are you running the built-in or a separate version of the AdminPanel (if you're not sure it's probably built-in)?

Valandur commented 6 years ago

Did this occur while you were on the "map" page of the AdminPanel?

sfxworks commented 6 years ago

Sorry for the delay.

This occurs on random pages at random loads/reloads. Will fetch version soon.

Valandur commented 6 years ago

So generally all user accounts get a request limit of 10/second, which should be more than enough. You could try adding rateLimit=100 to your users.conf file after the permissions entry. This wouldn't really fix the problem though, as it shouldn't be happening in the first place...

Valandur commented 6 years ago

Any updates on this? Otherwise I would close this issue.