1 Magma viscosity increases with higher silica content, and this viscosity directly affects how much gas is trapped in the magma.
“the viscosity also controls the gas content because if that magma is very sticky and pasty like a ritic or felic magma it's going to tend to trap a lot of the gases”