Shard can't recovery and cant assign

I have a cluster with 30 machines and create one index per day with date as the index name. by unknown reason, es process crashed on some machines.
then I found some shard will be unassigned.
so my question is under what condition the shard can't be recoveried and under what condition the shard won't be assigned?

How much RAM do you have for the node?