There was (is?) an issue with the perl regex engine which template uses to split the file into chunks. How big is your file? One way around the limit is to add a directive in the middle Something like this: Lots of text [% "" %] More text Splitting the file with a directive seemed to resolve the problem for me. Hope this helps S