PHP/MYSQL Script - 503 Service Unavailable

one text

Solution:

Best would be to see the server log which should tell what went wrong, but most likely it is simply the executing of a too large job that chrashed the execution. If the server is still available for other operations. The 503 means the server was doing its thing, but opted to abort. This could be because PHP was fine with a long execution, but MySQL timed out or refused to finish the job.

If possible, split the job up into multiple jobs and try it again in smaller chunks. If PHP can handle the time it takes, then try in a loop to make smaller request to the service (MySQL).

This kind of thing is not uncommon to occur in system that works fine sometimes, or worked for weeks, but suddenly fails.

Source