First, check if your transaction's setup(gas/gas limit) is ok (see this).
If everything is okay, the most probable issue might be the size of your contract. I suggest first take a look at this to get familiar with contract deployment's gas calculation.
Now, note that each block has a limited size(currently it is 15 million gas). This means that you cannot send transactions with more than this size. Which means that there is a limit for gas, too. (See these links: 1, 2, 3)
After reading the aforementioned links, I suggest (if it is possible for you (which seems to be a MUST TO DO)), minimize your solidity code as much as possible. Removing extra codes, results in less bytecodes, which means you will not exceed the gas limit. Be warned that decreasing the volume of your code should not result in decreasing the security and functionality of your code.
I hope this helps you.