Score:0

GRPC streaming not working when forwarded via Apache reverse proxy

gb flag

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?

Score:0
br flag

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
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.