restarting Oracle processes did not fix this problem.
My company is on APEX 5.1.3.00.05 and we started getting the Service Unavailable too, at certain times when editing a page. I have gone to a page, slightly changed PL/SQL on a process, and got Service Unavailable. One time I had to remove all of the blank lines. Another time I had to copy the code to TOAD, format it, copy it back onto the page, and that took care of it. There doesn't seem to be any rhyme or reason to it that we can determine.