Cron / max execution time / logs
-
Hi,
your plugin has two, three properties, which restrict its usage and creates a serious stability hazard.
Firstly, your plugin does not rely on the WordPress-internal cron, which – besides the fact that not every provider allows for individual crons – can result in unwanted high load, since the normal cron and your cron might run in parallel unwantedly.
Secondly, your plugin does not write logs on its own but relies on the piping the calls output to a file manually. This is really cumbersome and – again – might get restricted by security policies of a provider (understandably). In that case, you don’t get any logs for that operation.
Thirdly – and this is the worst – your plugin requires to configure the execution time to 1h. I cannot emphasize enough, how critical this requirement is. Since it is not possible to configure that for your script only, it is a global setting. Restricting max execution time to a low number (e.g. 30 seconds) is absolutely mandatory for server stability.
If e.g. there is a DOS or hacking attack (which happens multiple times a day), the server is able to recover from that by itself, because it will kill requests which take long due to high server load.
Thus, after a certain time, the server comes back to life.
With setting the max execution time to 1h, you completely bypass that security layer. It will be very easy to shoot the shop to the moon for hours.
And then the server monitoring will kick in and restart the server automatically, completely neglecting what you wanted to achieve with that long execution time (having enough time to process your updates without interruption). The concept just does not work!Besides that, since your own endpoint is publicly available, you even provide attackers the best entry point to kill the server with just a few calls. If your cron runs for, let’s say 10 minutes, you just need 6 calls to overload one core for an hour. You have 8 cores? Ok, then you need just 48 requests to achieve that.
Everyone out there can kill everyone’s server just by calling your endpoint via web browser and hitting reload a few times.
You really need to change this urgently.
This is baaaaaaad ??Thanks
Markus
- You must be logged in to reply to this topic.