[rabbitmq-discuss] Changing file descriptor limit wihtout restart?
Tony Garnock-Jones
tonygarnockjones+rabbitmq at gmail.com
Sat Jul 5 22:40:27 BST 2014
Try putting the call to sysconf() inside the loop.
On 5 July 2014 16:26, Jakov Sosic <jsosic at gmail.com> wrote:
> On 07/05/2014 08:58 PM, Michael Klishin wrote:
>
>> On 5 July 2014 at 22:56:11, Jakov Sosic (jsosic at gmail.com) wrote:
>>
>>> I know I can do it by setting up limits.conf and restarting RabbitMQ
>>>>
>>> nodes but I would prefer to do it without node downtime if possible.
>>>
>>
>> ulimit changes will only be effective after OS process restart.
>> This is true for all processes, RabbitMQ or not.
>>
>
> What about write-able limits and prlimit(2)?
>
> Although it seems writeable limits is not affecting running programs, at
> least not on CentOS 6... I have written small C program to verify this:
>
> #include <stdio.h>
> #include <limits.h>
> #include <unistd.h>
>
> int main(){
> int i=sysconf(_SC_OPEN_MAX);
> int n=0;
>
> while(n<1000){
> n++;
> printf("Max open files: %d\n", i);
> sleep(5);
> }
> return 0;
> }
>
>
> but, after running it and increasing ulimit via
>
> echo -n "Max open files=4096:4096" > /proc/<pid>/limits
>
> program still reports 1024 :-/
> _______________________________________________
> rabbitmq-discuss mailing list has moved to https://groups.google.com/
> forum/#!forum/rabbitmq-users,
> please subscribe to the new list!
>
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
--
Tony Garnock-Jones
tonygarnockjones at gmail.com
http://homepages.kcbbs.gen.nz/tonyg/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140705/be0bd61b/attachment.html>
More information about the rabbitmq-discuss
mailing list