genwork Posted May 14, 2021 Posted May 14, 2021 please don't suspend the account in case of accidental excessive memory and cpu usage, but please stop execution immediately and send 'Error 508 Resource Limit is Reached' to the client
wolstech Posted May 14, 2021 Posted May 14, 2021 This isn't really an option for us because (with exception to Wordpress) many times the load that gets people suspended isn't caused by excessive inbound traffic to an account. Very often it'll be caused by things like broken cron jobs, scripts stuck in infinite loops, or by poorly written continuously running programs (node.js, python discord bots, etc.), which more often than not don't have an incoming connection. That said, you could definitely implement your own code that checks the server load and make your application refuse service with a 508 if you wish. This would be an effective way to help reduce your account's chance of suspension. If your app disables itself and doesn't produce any load beyond spitting out the error and exiting when the server gets busy, you'll lower your chances of suspension drastically (during high load, the server suspends accounts in order with the heaviest users first until load is acceptable again).
genwork Posted June 1, 2021 Author Posted June 1, 2021 I'm using serverless php, how to make 'Error 508 Resource Limit is Reached' to the client, if the usage process almost exceeds the reasonable limit?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now