[rabbitmq-discuss] RabbitMQ waits forever for PID file during startup

Simon MacMullen simon at rabbitmq.com
Fri Jun 6 10:16:31 BST 2014


On 06/06/2014 9:48AM, Cesar wrote:
> Hi all,
>
> I am seeing this intermittent issue in RabbitMQ during its startup,
> right after installation. As you can see in this gist:
>
> https://gist.github.com/xcu/9509f1d285dd9556667c

Firstly, thanks for all the detail there.

> The startup was attempted at 0:51, and the wait /var/run/rabbitmq/pid is
> still hanging 9 hours later, which is blocking the rest of the
> installation. I believe the message in the startup_err is probably the
> cause of this, but after googling it I have found nothing useful.

So it looks like the startup shell script is failing to write its pid 
(which will become RabbitMQ's pid) to a file. The process which then 
waits for startup to complete then hangs forever since the file is missing.

So there are two issues here. One is that failing to write the pid file 
should lead to immediate failure - probably the script just needs to set 
"-e". I will make sure this gets some attention.

The second, and more baffling, issue is that on your system(s) the shell 
command:

     echo $$ > ${RABBITMQ_PID_FILE}

is actually failing due to "Cannot allocate memory". Yet in your startup 
log the machine seems to have 256GB, which ought to be enough to run 
even the most bloated version of echo.

So is it something about piping to a file? Are you hitting some ulimit 
or another? Is there anything unusual on this machine in terms of 
resource limits?

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list