Q:

Spring Boot - Tomcat - Apache2 - HTTP 503 Error - ProxyIOBufferSize

I have installed my Spring Boot application at an Ubuntu version 18 server.
I use apache2 and lets encrypt to secure the application with SSL.
The application works fine in 95%, sometimes I get a HTTP 503 error at the client (Browser debugging view)
If HTTP 503 appears at the Browser/Client an entry is also made at apache2 log file which looks like this:
[Thu Mar 26 00:10:52.731383 2020] [proxy_ajp:error] [pid 16266:tid 139926293157632] [client 
xxxx.xxxx.3.59:60869] AH00893: dialog to 127.0.0.1:9090 (localhost) failed, referer: 
https domain
[Thu Mar 26 00:10:57.802571 2020] [proxy_ajp:error] [pid 16266:tid 139926720988928] 
(70014)End of file found: AH01030: ajp_ilink_receive() can't receive header
[Thu Mar 26 00:10:57.802597 2020] [proxy_ajp:error] [pid 16266:tid 139926720988928] [client 
xxx.xxx.3.59:60875] AH00992: ajp_read_header: ajp_ilink_receive failed, referer: 
https domain
[Thu Mar 26 00:10:57.802628 2020] [proxy_ajp:error] [pid 16266:tid 139926720988928] 
(120006)APR does not understand this error code: [client xxx.xxx.3.59:60875] AH00878: read 
response failed from 127.0.0.1:9090 (localhost), referer: https domain

I found this thread:
We did some more investigation and found that the Apache setting that enables packets > 8192 
(ProxyIOBufferSize 65536) was not going into effect because it was wrapped in an <IfModule 
... > condition. (The module is loaded but we are investigating why the condition isn't 
satisfied.) Tomcat 8.5 worked because it never sent packets larger than 8192, even though it 
was allowed to, Tomcat 9 is sending bigger packets as it is configured to. With 
ProxyIOBufferSize outside of the conditional, it is now working as expected.

My question now would be if it is possible that the size of ProxyIOBufferSize is to small and how can I adjust ProxyIOBufferSize in apache2 config file. 

A:

You can change ProxyIOBufferSize Directive of Module mod_proxy ref : https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyiobuffersize
Edit proxy section of /etc/apache2/sites-enabled/000-default.conf :
<Proxy>
    ProxyIOBufferSize 65536
</Proxy>

