We explore the coherent perfect absorption of light in a nonlocal metal-dielectric composite film in which metallic nanoparticles (gold) are randomly embedded in the dielectric host medium (silica). The two coherent light beams illuminate the gold-silica composite slab respectively from the left and right sides at the same angle of incidence and the conditions required for coherent perfect absorption are investigated each as a function of different system parameters. Under different system parameters, we study the coherent perfect absorption of a nonlocal particle composite medium. A nonlocal effective medium theory is proposed to approximately describe the metal-dielectric composite film. The effective permittivity and effective permeability of the composite medium are approximated by using the effective medium theory under the model of coated sphere with core and shell. According to the effective dielectric parameters of the composite medium, we can obtain the transmission coefficient and reflection coefficient of the plane wave incident on the slab. By comparing and analyzing the coherent perfect absorptions of the composite medium under nonlocal and local conditions, we find that under the influence of nonlocal effect when the size of particle is very small, the frequency range of incident light that produces the coherent perfect absorption of the composite medium increases and the small size can also cause the coherent perfect absorption to occur in wider frequency range. Especially, we pay attention to the choosing of physical parameters in the design of coherent perfect absorption with macroscopic composite slab when we take the nonlocal effect (or spatial dispersion) into account. In the further calculation, the coherent perfect absorption of the composite medium can be realized by changing the system parameters such as the thickness of composite slab, the wavelength of incident light, the volume fraction of metal particles, etc. We also bring about the coherent perfect absorption at a small volume fraction which satisfies all the conditions. Finally, according to these results, we can realize the control of the coherent perfect absorption with nonlocal effect. Our study may be helpful in designing the optical nanoabsorbers.