
When using the Racket package server, I often get Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request
Reason: Error reading from remote server
Apache/2.4.18 (Ubuntu) Server at <http://pkgd.racket-lang.org\|pkgd.racket-lang.org> Port 443
instead of the next page I expect. This happens for different actions/pages, and it happens intermittently (but quite often).

@hj93 I don’t know much about music but rsc looks like a good option for Racket: https://github.com/khafatech/rsc3/blob/master/README.md\|https://github.com/khafatech/rsc3/blob/master/README.md
It uses the OSC protocol to drive ‘scsynth’ – A real-time audio server that is part of Supercollider: https://supercollider.github.io/\|https://supercollider.github.io/
I think the authors are on the Racket Discourse: https://racket.discourse.group/\|https://racket.discourse.group/
There may be other Racket music people on Racket Discord or Slack

Yep…

While I did encounter this very often in the past, today I cannot provoke it.

Probably, the apache server is keeping connections open for too long. The web server expires them due to timeouts and then new requests to existing connections fail (RST). After the requests fail, it probably discards the old connections and creates new ones.

It looks like the ProxyPass
directive takes a ttl
argument, so the fix is to either set that to a value that’s 60 or lower or to disable connection reuse (the disablereuse
flag).
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass
cc @samth

Also, if the proxy and the racket server are on different physical servers, turning on TCP keepalives (the keepalive
arg) might help.