The asymptotic distribution of the maximum of a random number of random variables taken from the model below is shown to be the same as when their number is a fixed integer. Applications are indicated to determine the service time of a system of a large number of components, when the number of components to be serviced is not known in advance. A much slighter assumption is made than the stochastic independence of the periods of time needed for servicing the different components. In our model we assume that the random variables can be grouped into a number of subcollections with the following properties: (i) the random variables taken from different groups are asymptotically independent, (ii) the largest number of elements in a subgroup is of smaller order than the overall number of random variables. In addition, a very mild assumption is made for the joint distribution of elements from the same group.