There is indeed a max limit of 1GB
for the pdb size.
There is some trick to extend this to 2GB
(more info about that can be found Here). Basically you have to generate the initial pdb file yourself instead of the compiler.
Other things you could do is do some active hoisting on your template code as this might effect your pdb sizes also.