What's a proper HTTP Status code when the server cannot process the response due to the large number of records that are there in the Database (may be due to the large record size and it's going to taking too much of time to process it) as part of the request that user sent? We wanted to tell the client that there were too many records. The request is semantically correct in this case, but since the server is not able to process it due to it's processing power limitation, we have to give an error response.
For example, let's say client tried to generate all the transactions in the past 3 years out of the maximum allowed duration of 5 years. But since there are more transactions done by the client within 3 years, the server would like to communicate to the client to reduce the duration further. The reason being the hardware resources at the server side is limited and cannot process this huge number of records.
It should not be categorised under the 4xx errors since it's not an issue with the client right? If yes, what's the best 5xx STATUS code to be set for this?