I am sharing a workaround solution to this error when calling a Julia HTTP server behind HAProxy:
Error: (Base.IOError("read: connection reset by peer (ECONNRESET)", -104)
If you google it you’ll find other applications than Julia that have the same problem and people advice to try to change the default
option http-keep-alive to
option http-server-close or
option httpclose or to play with the different timeout values.
In my case nothing worked so I tried to use another reverse proxy (with load balancing).
There are a few open-source options (eg. https://www.cyberciti.biz/open-source/http-web-performance-proxy-load-balancer-accelerator-software/). I gave a try to Pound and it solved my problem
The project is still active but there is a lack of packaging for the distros I am using (Fedora, Debian).
For Fedora, as of today, you need to install an additional repo as explained here
For Debian, as of today, ‘buster’ does not have a package for Pound, you need to enable the repository of ‘stretch’ to have it available. Also, on Debian, do not forget to set
/etc/default/pound I lost a lot of time trying to figure out why the changes in pound.cfg were not taken into account.
Hope this will help others