docker-taiga / rabbit

0 stars 6 forks source link

Waiting $pidfile instead of $pid #1

Closed RyoNkmr closed 4 years ago

RyoNkmr commented 4 years ago

I found it seems to timeout very often with a message timeout value 10000 and it will be failed to wait for the process.

wait pid_file, wait --pid pid

https://www.rabbitmq.com/rabbitmqctl.8.html#wait

Thank you for the helpful images.

w1ck3dg0ph3r commented 4 years ago

Thanks! Is this timeout caused by rabbitmq actually taking longer than default 10s to start? Because in that case I don't see how waiting for pidfile is different. Maybe I'm missing something?

RyoNkmr commented 4 years ago

@w1ck3dg0ph3r

Is this timeout caused by rabbitmq actually taking longer than default 10s to start?

rabbitmqctl wait is not for pid, but for the path where pid file is. then rabbitmqctl wait $pid does just stop til 10s anyway whether the process gets succeeded or failed. because the code with cat gets pid itself. not its path.

w1ck3dg0ph3r commented 4 years ago

Oh, thanks, I see I've missed --pid argument. Would it be better to set RABBITMQ_PID_FILE to static path without instance id in it, and just wait for that path? Thus getting rid of the loop in the script?

RyoNkmr commented 4 years ago

Would it be better to set RABBITMQ_PID_FILE to static path ... Thus getting rid of the loop in the script?

You're completely right, the loop is removed from the script!(in c83f082)