Fix calculation of number of pending requests

Also use a more realistic value for the max sockets