How to fix the “508 Resource Limit is reached” error in WordPress?
Actually it happens when the number of processes exceeds the limits set by the hosting provider. To avoid either we need to enhance the capacity by hosting providers or we need to check in the code whether any process takes longer time (like background tasks).