-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm getting intermittent "No template exists with name" errors #48
Comments
Are you running the templates while trying to compile them in parallel? |
Woops, didn't see your response there :( It is possible that sometimes the code reaches the call to the template before the loading-code finished running (the loading is an async process because it takes more than 20 seconds, I have a lot of templates), what I know is - the problem doesn't go away with time. However, it's highly intermittent and I couldn't find a solid cause for this. I've added all kinds of logging messages all around the template loading code and it seems like all templates are loaded correctly (like I said in the OP - I get no errors at all while loading, ever), but the "template doesn't exists" errors don't go away, I have to restart the server to get them to work. I have the template-loading code in the Application_Start event, maybe because the dev-server keeps recreating them it creates an I/O problem? I really don't know but it happens often enough to make me worried of what will happen in production (not there yet) I'm on a slightly outdated version, haven't updated in months, if that matters Thanks |
I'm getting these errors under IIS as well :( this is how I compile the templates:
Then I find the correct template in the compiledTemplates list and Run Thanks. |
I tried to remove the parallel thing, but it was to slow, so I just adjusted to compile on demand, hope it was because of the parallelization and this solves the problem. |
It's very weird, normally everything works, every now and again, I get this error on several templates. I restart the ASP.Net dev server and it goes away, then after some code rebuilds it comes back. No errors are thrown while calling
Service.Compile
, but when I callService.Run
it comes back with the "no template exists" error.I fetch and compile templates on application start, it takes about 10 seconds in a newly spun thread with parallel foreach - if the template is accessed while it's compiling - can that cause this issue?
Are the compiled templates saved to disk as files? Could there be name collisions? What could cause a template to compile but not run afterwards?
Without parallelization it takes 30+ seconds, would be cool if there was a way to avoid recompiling them on every server restart.
Thanks
The text was updated successfully, but these errors were encountered: