I got it so the balls don't fly out of the structure. A couple of things. Number one is the size of you objects. They are tiny. Any time you're using physics or physical lighting/rendering, scale matters. These simulations are trying to simulate the real world, and when your scene is so small, the calculations are basically "low resolution." Maybe if you crank up the Steps and the Solver Iterations. Not sure.
So I scaled your objects up so the group is around 3,700 cm tall. Yours is only 18 cm tall. Basically, I scaled it up until your spheres were similar size to the default sphere. Also your Collision shape is set to Automatic. I switched it to Moving Mesh. Make sure the spheres are not intersecting with the collision mesh. I also played with Mass and Gravity.