I found the problem, i am hitting a "ulimit -n" limit, since my test is running on a same machine, it creates n channels for n clients which corresponds to socket file for each of them.
On Wed, Oct 27, 2021 at 3:49 PM Roshan Chaudhari <rgc...@gmail.com> wrote: > I am running sync server, and trying with multiple parallel client. > However, i see crash in the server as I increase number of clients. here is > a piece of code: > > void fn() { > CreateServer(grpc::InsecureServerCredentials()); > constexpr int kNumClients = 1000; > constexpr int kNumMsgs = 1000; > > std::vector<std::thread> threads; > auto channel_creds = grpc::InsecureChannelCredentials(); > for (int id = 0; id < kNumClients; id++) { > threads.emplace_back(([&] { > auto client = CreateClient(channel_creds); > > test::TestRequest request; > for (int i = 0; i < kNumMsgs; i++) { > std::string temp; > temp.resize(6400); > request.set_data(temp.data(), temp.size()); > if (!client->Write(request)) { > LOG(ERROR) << "writer returned false, exiting.. "; > break; > } > } > > client.reset(); > })); > } > > for (int id = 0; id < kNumClients; id++) { > threads[id].join(); > } > > } > > the error i am getting is: > > E1027 15:32:51.515823940 28603 ev_epollex_linux.cc:1298] > pollset_add_fd: > {"created":"@1635328971.515750825","description":"pollset_transition_pollable_from_fd_to_multi","file":"external/com_github_grpc_grpc/src/core/lib/iomgr/ev_epollex_linux.cc","file_line":317,"referenced_errors":[{"created":"@1635328971.515713815","description":"Too > many open > files","errno":24,"file":"external/com_github_grpc_grpc/src/core/lib/iomgr/ev_epollex_linux.cc","file_line":560,"os_error":"Too > many open files","syscall":"epoll_create1"}]} > " > > what is it I am doing wrong here? > > > - > Roshan > > -- > You received this message because you are subscribed to a topic in the > Google Groups "grpc.io" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/grpc-io/jsJcqzOwcxg/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > grpc-io+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/grpc-io/1d8d4b45-4efc-43e7-ac6b-422880e2313dn%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/1d8d4b45-4efc-43e7-ac6b-422880e2313dn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAG4P-Su0dwHKaeSParNVbQ%3DeapNLY%3DaO1b%2B_JwvtYvfU%2B597gA%40mail.gmail.com.