[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Regarding info about Libevent configuration



On Fri, Mar 17, 2017 at 7:26 AM, Sakthivel Subramaniam
<Sakthivel.s@xxxxxxxxxxxx> wrote:
>
> Hi,
>
> I'm new to libevent and I have the code changes with libevent functions. My
> program was working fine upto 1000 client connections (events).
>
> when I try to connect 2000 cilents, its failing and can see message losses.
>
>
> 1.Can you please et me know, is any limitation for total number events/ how
> can we modify number of max events?

Hi,

I guess that you have limit for number of opened files installed to ~1024.
Take a look at setrlimit(RLIMIT_NOFILE) (if you run your program from
root you can install it there) or  "ulimit -n" from shell.

> 2. I have created an event with event_new() with EV_READ. After some time I
> want to change this event to EV_WRITE. what should I do for this? Is there
> any modify function is available?

No, just use
- event_del()
- event_assign()
- event_add()

Cheers,
Azat.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.