Jinja live parser
jinja2test.tk
jinja2test.tk
Eg. if you paste {% for i in range(10000000000) %}{% endfor %} and press Convert tens of times it will take down your site.
(I submitted the story but I am not the developer.)
1. Use SandboxedEnvironment instead of Environment.
2. Render the template via multiprocessing with a 10 second timeout. This should solve some of your DOS issues.
in my context, this site can be used to test your template logic before applying it to production systems.