Excess requests for maven-metadata.xml in maven-download
Closed this issue · 2 comments
Not sure if this is the best place to raise this issue, since docker-minecraft-server itself could be where the problem lies... I've seen an excessive number of requests to the maven-metadata.xml
file on the maven for packwiz from a very small number of IPs using mc-image-helper. Some of these send requests up to 7 times per minute, resulting in over 500k requests last month, and none of them are cached so they always request the full ~1.3kB every time.
It's far from being a problem at the moment, so I don't want to cause any undue concern - the actual bandwidth used is very small and I'm well below the minimum monthly fee for BunnyCDN. It seems a bit pointless though, so it might be a good idea to cache the maven-metadata.xml
file, and only re-request it when it is old (e.g. >1h since last requested).
These requests might be symptomatic of a different problem - why are these servers are re-requesting the metadata so frequently? If it happens when the server fails to start (so it gets into a restart loop) should there be a limit so the server gives up after a number of tries? I'm not sure how much of this is in your control since Docker manages container starting/restarting, so no worries if you can't do much about it.
Yes, a lot of this is beyond my control, but I will certainly look into saving off a copy of the retrieved metadata file in case they are crash looping containers causing this.
Got caching added into the latest image, but we'll have to wait for users to pull that image update.