Skip to content
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

bug: strange errors when light pushing messages with payload >= 300 kb #2565

Closed
fbarbu15 opened this issue Apr 3, 2024 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@fbarbu15
Copy link
Contributor

fbarbu15 commented Apr 3, 2024

Problem

When the payload is >= 300 kb the light push fails with some strange messages

Payload ~= 300 KB

payload=$(head -c $((1024 * 225)) /dev/urandom | base64 -w 0) && \
echo "{\"pubsubTopic\": \"/waku/2/rs/0/0\", \"message\": {\"payload\": \"${payload}\", \"contentTopic\": \"/myapp/1/latest/proto\", \"timestamp\": 1712135330213797632}}" > /tmp/message_payload.json && \
curl -v -X POST "http://127.0.0.1:56923/lightpush/v1/message" -H "Content-Type: application/json" -d @/tmp/message_payload.json

Error is Failed to request a message push: Exception reading: Stream Remotely Closed! with 503 Service Unavailable

  1. Payload > 300 KB
payload=$(head -c $((1024 * 250)) /dev/urandom | base64 -w 0) && \ \
echo "{\"pubsubTopic\": \"/waku/2/rs/0/0\", \"message\": {\"payload\": \"${payload}\", \"contentTopic\": \"/myapp/1/latest/proto\", \"timestamp\": 1712135330213797632}}" > /tmp/message_payload.json && \
curl -v -X POST "http://127.0.0.1:56923/lightpush/v1/message" -H "Content-Type: application/json" -d @/tmp/message_payload.json

Error is Push request timed out with 503 Service Unavailable
light_push_node_that_sends_the_messages.log
relay_node.log

@fbarbu15 fbarbu15 added the bug Something isn't working label Apr 3, 2024
@gabrielmer gabrielmer assigned gabrielmer and unassigned gabrielmer Apr 9, 2024
@gabrielmer
Copy link
Contributor

I was able to reproduce it. Seems that when sending such a large payload when using nwaku as a lightpush client, the request to the lightpush server doesn't go through.

Either the connection is dropped, or the request exceeds the lightpush client's REST server timeout.

In any case, such a large payload isn't allowed, as our max allowed is 150KiB.

@gabrielmer
Copy link
Contributor

@fbarbu15 should we close this issue? or what exactly needs to happen in order for it to be resolved?

@fbarbu15
Copy link
Contributor Author

I would expect a more clear error, saying the payload is too big.

@fbarbu15
Copy link
Contributor Author

Fixed by #2695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants