In the access log, 503 is the code, 400 is the response body size of 503 error returned.
503 error is caused by PHP crash, please take a closer look at error log and stderr.log for messages related to the 503 error.
please post your lsphp5 external app configruation.
Have you tried different PHP version?
It will be easy to trouble shoot if 503 consistently happen with certain URL, if it is random, it is hard to debug.