A fundamental challenge for millimeter wave (mmWave) communications lies in its sensitivity to the presence of blockages, which impact the connectivity of the communication links and ultimately the reliability of the network. In this paper, we analyze a mmWave communication system assisted by multiple reconfigurable intelligent surface (RISs) for enhancing the network reliability and connectivity in the presence of random blockages. To enhance the robustness of beamforming in the presence of random blockages, we formulate a stochastic optimization problem based on the minimization of the sum outage probability. To tackle the proposed optimization problem, we introduce a low-complexity algorithm based on the stochastic block gradient descent method, which learns sensible blockage patterns without searching for all combinations of potentially blocked links. Numerical results confirm the performance benefits of the proposed algorithm in terms of outage probability and effective data rate.