Jump to content

Recommended Posts

Posted

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

 

Posted

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).

  • 3 weeks later...
Posted

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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...