New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Websocket response are not complete #4446
Comments
Any progress? |
I can confirm I'm having the same issue. In my case I tried running Treafik (v1.7.10) in front of couchbase's sync gateway. When certain documents attempt to replicate (larger ones I'm guessing) the packets arrive at sync gateway incomplete. |
I'm having the same problem. I can't use Tarefik in front of couchbase sync gateway in order to upload attachments. Is this something Traefik 2.0 fixes? |
i have the same issue with socket
|
@meodemsao @theolampert @farodin91 I have been trying to understand what could be wrong with this. Since document replication works, why attachments? Don't is it because of any custom header? Is it because of some packet routing size limit? Does anyone has leads? |
my system can't subscription when i change from nginx to traefik |
What do you mean with "can't subscription"? |
@sinosoidal I experienced the issue with larger documents not just attachments, I've since switched out traefik for nginx and everything seems to be working fine again. |
@sinosoidal i using websocket for pub/sub in my system |
@theolampert i using nginx with docker-compose before but seem harder config than traefik. |
@theolampert yes, i also find this solution. I will try this |
@theolampert so the size matters. Someone from Couchbase shared this with me: https://github.com/couchbase/couchbase-lite-core/issues/503 Someone using a Azure reverse proxy to server Sync Gateway was having the same kind of issue. It was related with the maximum packet size allowed. Maybe on Traefik the problem is similar. Thoughts? |
I'm having the same issue with websockets using a Flask-SocketIO backend: a large data stream will be split up in multiple chunks that are not recognized by the Flask-SocketIO server. Without Traefik (latest stable version) in between it works flawlessly. Can we set the chuck size of Traefik somewhere? It seems to be chuncked at 4096 bytes |
Is there a solution to this problem? |
For us, this issue popped up when putting Traefik in between a Go server and an Elixir client. Traefik (or the Go runtime, or As far as I understand, it does this in an RFC-compliant manner, but the behaviour seems sufficiently rare for it to be ignored by quite a few websocket clients. If you're having disconnection issues through Traefik, try consuming the websocket using another library or runtime (Go always dealt with this just fine), or use a packet dump of the traffic received by your client to debug its websocket library. The RFC states:
We fixed this in @ewoudwerkman was right in suggesting it being related to fragment size, but I'm not sure if it makes sense to expose this as configuration, as this may change based on the context (available memory, system load, etc.). Either way, this is likely an issue with websocket message receivers (whether they're clients or servers) that should be fixed, since any sender could fragment traffic in this way. |
@ti-mo Thanks for your response. Since our Flask app is using uwsgi in production, I now knew where to look for a fix #unbit/uwsgi#1350 and for a solution in #unbit/uwsgi#1853 ;-) |
Do you want to request a feature or report a bug?
Bug
What did you do?
I tried to run a JanusGraph through Traefik and simulate our load against traefik. JanusGraph is a graph database that uses Websockets for clients to connect to its server part.
Simulation of load means to run a lot Websocket requests with large requests and responses. Responses are often too large for a single Websocket message and are therefore sent via multiple messages. The protocol is explained in detail here.
What did you expect to see?
Some behaviour as nginx.
We currently run our janusgraph against a nginx as proxy with following config:
What did you see instead?
Incomplete packet transport with websocket
Output of
traefik version
: (What version of Traefik are you using?)What is your environment & configuration (arguments, toml, provider, platform, ...)?
docker-compose.yml for janusgraph
docker-compose.yml for traefik
docker-compose.yml for nginx
If applicable, please paste the log output in DEBUG level (
--logLevel=DEBUG
switch)I see a lot of these log lines.
The text was updated successfully, but these errors were encountered: