sschwarzer
2022-6-26 11:43:58

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).


spdegabrielle
2022-6-26 11:48:05

@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


sorawee
2022-6-26 13:40:41

Yep…


sorawee
2022-6-26 19:55:37

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


popa.bogdanp
2022-6-27 06:03:58

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.


popa.bogdanp
2022-6-27 06:09:35

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


popa.bogdanp
2022-6-27 06:30:07

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