~
For a website when it is database driven - it pulls the stored data, saves the new data constantly depending on the request from the users.
When it comes to pulling data and when it's too many data to pull (say entire table for merit history) sometimes it cross the default time defined by the database server. The user ends up seeing error then.
When too many users (client side) are interacting with the database (server side) at the same time then because of the bandwidth limitation and/or possible other factors, a database server can refuse request. The user will end up seeing error.
Anyway I guess the below references will give you a decent idea.
503
Note: The existence of the 503 status code does not imply that a
server must use it when becoming overloaded. Some servers may wish
to simply refuse the connection.
Note: Note to implementors: some deployed proxies are known to
return 400 or 500 when DNS lookups time out.