[rabbitmq-discuss] limits.conf not working...
Simon MacMullen
simon at rabbitmq.com
Thu Apr 19 12:07:08 BST 2012
Hi Gonzalo.
So I think maybe some of these steps are not necessary. I was able to
modify the ulimit with the 2.8.1 deb just by adding lines for *root* in
/etc/security/limits.conf. In particular, it was not necessary to make
RabbitMQ run as root by modifying the START_PROG= line.
So this is still not a great solution; we'll have a fix in the next
release. But it's less ugly.
Cheers, Simon
On 19/04/12 09:59, Gonzalo Fernandez wrote:
>
> Thanks Matt,
>
> now I know.
>
> Anyway, trying, based on this new information you guys gave me, I
> figured out that having*/etc/security/limits.conf*
> with:
>
> *rabbitmq soft nofile 10000*
> *rabbitmq hard nofile 65000*
> *root soft nofile 10000*
> *root hard nofile 65000*
>
> Editing */etc/pam.d/common-session{,-noninteractive}* adding:
> *session required pam_limits.so*
>
> And editing the */etc/init.d/rabbit-server* file making root the user to
> execute the script (*START_PROG="start-stop-daemon -v --chuid root
> --start --exec"*) I got to see the rabbitmq limit.conf value on the
> management site, which I couldn't see before.....
>
> I know it is rough... *I do not recommend doing this *but it is just to
> check that limits.conf works.
>
> I installed everything from zero, again. On a brand new machine. And it
> works.... Now it works.... without doing anything strange.
> I modify the limits.conf file and I see it on the management plugin
> site. It is incredible... I still don't know what is wrong on the other
> machine, but it works on this new one.
>
> Cheers.
>
>
> G.
>
>
> 2012/4/18 Matthias Radestock <matthias at rabbitmq.com
> <mailto:matthias at rabbitmq.com>>
>
> On 18/04/12 10:56, Gonzalo Fernandez wrote:
>
> In another machine, same system different rabbit version (2.7.1
> insteasd
> of 2.8.1) it worked perfectly.
> Simon said that the version could not be the problem.
>
> "No. RabbitMQ only ever *reports* on the FD limits it is seeing, it
> doesn't impose any more. And this code has not changed from
> 2.7.1 to 2.8.1"
> *
> *
>
> I can't scratch my head any longer...
>
> Has anyone had this problem before? Any thoughts?
>
>
> There was a change between 2.7.1 and 2.8.0 that may have caused
> this. The startup scripts on debian-like systems now use
> 'start-stop-daemon' instead of 'su', which resolved the long
> outstanding problem of rabbit sometimes preventing the OS from
> shutting down. Needs investigating.
>
> Matthias.
>
>
--
Simon MacMullen
RabbitMQ, VMware
More information about the rabbitmq-discuss
mailing list