Memory error when using more layers in CNN model
More layers mean more parameters for your network, which in turn means more required space in memory to store those parameters.  
The only solution (besides increasing the memory of your computer) is reducing the size of your network. A few pointers on this: Firstly, 3-D CNNs require much more space than 2-D ones. One idea could be to shift to a 2-D one. Other than that, the layers with the most parameters are the FC ones. These are sometimes redundant. I'd suggest reducing the size of those first.