Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"random: nonblocking pool" initialization taking a long time on Ubuntu 16.04 Server

On Ubuntu 16.04 Server (Kernel 4.4.0-22) it takes 2-5 minutes to initialize the "random: nonblocking pool" according to /var/log/syslog, compared to Ubuntu 14.04:

May 28 18:10:42 foo kernel: [  277.447574] random: nonblocking pool is initialized

This happened a lot faster on Ubuntu 14.04 (Kernel 3.13.0-79):

May 27 06:28:56 foo kernel: [   14.859194] random: nonblocking pool is initialized

I observed this on DigitalOcean VMs. It's causing trouble for Rails applications because the unicorn server seems to wait for this pool to become available before starting up.

What is a reasonable time for this initialization step?

Why would it take so much longer on Ubuntu 16.04?

Is it reasonable for an application to wait for this pool to become available or might the dependency on the pool be a bug on the application side?

like image 910
Ralf Ebert Avatar asked May 28 '16 16:05

Ralf Ebert


1 Answers

"apt-get install rng-tools" which makes Ubuntu use available hardware number generators fixes this issue - the pool will be ready in 10s instead of minutes then.

like image 137
Ralf Ebert Avatar answered Sep 18 '22 17:09

Ralf Ebert