0

I have a gRPC service and I want to deploy it behind an Apache reverse proxy.

The apache configuration is similar to the following:

LoadModule http2_module modules/mod_http2.so
LoadModule proxy_http2_module modules/mod_proxy_http2.so
...
<VirtualHost _default_:443>
  SSLEngine on
  SSLProxyEngine on
  ServerName service.mydomain.com:443
  SSLCertificateFile ".../mycert.crt"
  SSLCertificateKeyFile ".../mycert.key"
    
  ProxyPass / h2c://localhost:5048/
  ProxyPassReverse / http://localhost:5048/

</VirtualHost>

The unary RPC-s works fine. But I want to use bidirectional calls. These calls never end, after timeout I get an error.

I made several attempts by increasing the timeout and the like, without success.

What could be the problem?

crazyman
  • 66
  • 5

1 Answers1

0

Try changing the ProxyPass and ProxyPassReverse directives to the following

ProxyPass "/" "h2://localhost:5048/"
ProxyPassReverse "/" "h2://localhost:5048/"

you may also need to adjust the Timeout and ProxyTimeout directives to ensure that the requests have enough time to complete. You can try increasing these values to see if it improves the behavior.

Timeout 600
ProxyTimeout 600
Salim Aljayousi
  • 341
  • 1
  • 3