Connection fails after processing several requests
- Dominant language
- Crystal
- Stars
- 3
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Hello @hugopl,
Thanks for your great work. I really appreciate the simple architecture of the project.
I encountered the problem with processing connections via proxy after sending several requests. The more data is being sent in each connection, the more likely the problem is (for JSONs I noticed it after 10-20 requests but for HTMLs it happens after just 2-3 requests in my case). After sending n-th request, the response never arrives (client is waiting indefinitely for server's response or just time outs). When the issue occurs, the whole proxy application becomes unresponsive (does not even respond to `CTRL^C`).
My setup:
- python 3 http server, just simple directory listing on port `23238` - `python3 -m http.server 23238`,
- delay-proxy listening on port `2000` and redirecting everything to `23238` without any delay - `./bin/delay-proxy :23238 2000 0`,
- Insomnia for sending http requests to port `2000`.
For simple JSON responses, the problem was much more likely to happen if there are a few seconds of inactivity (without any requests to proxy). In such case, the first request after the inactivity time crashed my proxy in most cases. Sending consecutive requests worked fine most times. So my assumption was an issue with socket timeouts or not closing previous connections properly but I didn't find anything while debugging.
Demo recording: https://youtu.be/hQg0gpRgjT0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.