Comments (6)
Fixed in commit 56c0b28
from redis.
The content you are sending on the publisher is humm is this also causing the problem?
from redis.
I can reproduce, but only in release mode, not in debug.
from redis.
I can reproduce, but only in release mode, not in debug.
It might be dependent to memory layout, I'm using clang-15 and it occurs in debug too.
Try another message that might happens in debug too.
from redis.
A subscriber implemented with low-level functions doesn't suffer from that problem, so it looks like it is not a parser problem. I it receives EOF from the server, perhaps for being able to keep-up with the high volume of messages, I have to measure more, see below
#include <boost/asio.hpp>
#include <iostream>
#include <aedis.hpp>
#include <aedis/src.hpp>
namespace net = boost::asio;
namespace resp3 = aedis::resp3;
using resolver = net::use_awaitable_t<>::as_default_on_t<net::ip::tcp::resolver>;
using tcp_socket = net::use_awaitable_t<>::as_default_on_t<net::ip::tcp::socket>;
using aedis::adapter::adapt2;
using net::ip::tcp;
auto co_main(std::string host, std::string port) -> net::awaitable<void>
{
try {
auto ex = co_await net::this_coro::executor;
resolver resv{ex};
auto const addrs = co_await resv.async_resolve("127.0.0.1", "6379");
tcp_socket socket{ex};
co_await net::async_connect(socket, addrs);
// Creates the request and writes to the socket.
resp3::request req;
req.push("HELLO", 3);
req.push("SUBSCRIBE", "test-channel");
co_await resp3::async_write(socket, req);
std::string buffer, resp;
auto dbuffer = net::dynamic_buffer(buffer);
for (;;) {
co_await resp3::async_read(socket, dbuffer);
//std::cout << "ddd" << std::endl;
}
} catch(std::exception const& e) {
std::cout << e.what() << std::endl;
}
}
int main()
{
net::io_context ioc{};
net::co_spawn(ioc, co_main("127.0.0.1", "6379"), net::detached);
ioc.run();
}
from redis.
It seems max_read_size in make_dynamic_buffer is related to this issue, tuning it to something higher for example 512000 solves the issue.
https://github.com/mzimbres/aedis/blob/c88fcfb9edbaca3cc90e761d8b3087c0eed4a9fb/include/aedis/detail/connection_base.hpp#L306
from redis.
Related Issues (20)
- Pass socket close errors to the caller HOT 1
- Understand why we have to call connection.cancel in the TLS test
- MGET with invalid key unexpectedly reports error HOT 4
- Remove resp3::read and resp3::async_read
- Enable reading server pushes in batches
- geoadd error HOT 1
- Boost docs formatting problems
- Docs styles minor tweaks
- Add ability to check if initial connection to server succeeded HOT 2
- Support containers in CI HOT 1
- Using AWS cluster - Trouble writing values to it HOT 5
- No way to specify CA/client certificate for SSL connections. HOT 10
- Where to reinstate SSL verification spec? HOT 4
- Redis client fails to process all the requests. HOT 30
- How to use cmake or link an example? HOT 5
- Windows Visual Studio 2022 C++17/C++20 failed compilation of src.hpp. HOT 14
- Are distinct connection objects thread safe ? HOT 24
- How to treat well return nothing lua function ? HOT 2
- Question about boost::redis::request::config HOT 17
- second call to async_exec hangs and never returns HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis.