# can update templates without restart gunicorn?

**URL:** <https://forum.djangoproject.com/t/can-update-templates-without-restart-gunicorn/14087>\
**Category:** Deployment\
**Created:** [June 2, 2022, 12:53pm UTC](https://forum.djangoproject.com/t/can-update-templates-without-restart-gunicorn/14087 "2022-06-02T12:53:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xMrAli](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/xmrali/32/8206_2.png) [@xMrAli](https://forum.djangoproject.com/u/xMrAli)\
**Post date:** [June 2, 2022, 12:53pm UTC](https://forum.djangoproject.com/t/can-update-templates-without-restart-gunicorn/14087/1 "2022-06-02T12:53:53Z")

</div>

Hi  
I did deploy Django based on [this guide:](https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-20-04)

The main issue, now i need to **restart gunicorn** to reflect any update in app templates.  
Is there a way to update templates without restart Django server (gunicorn or other server)?

other thing, if i restart the Django server (takes a few seconds) is that can effect the visitors or the #SEO rating, by showing error pages like 500 or 404 etc ?

---

<div class="post-metadata">

**Author:** ![carltongibson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/carltongibson/32/267_2.png) [@carltongibson](https://forum.djangoproject.com/u/carltongibson)\
**Post date:** [June 2, 2022, 1:21pm UTC](https://forum.djangoproject.com/t/can-update-templates-without-restart-gunicorn/14087/2 "2022-06-02T13:21:00Z")

</div>

Not out of the box… 🤔

You’ll be using the cached template loader, which is important for performance.

You could **try** calling the internal `django.template.autoreload.reset_loaders()` — which is what happens in development — **but that’s not officially supported API** , so take that as you will.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [June 2, 2022, 1:46pm UTC](https://forum.djangoproject.com/t/can-update-templates-without-restart-gunicorn/14087/3 "2022-06-02T13:46:01Z")

</div>

> [@xMrAli](#):
>
> if i restart the Django server (takes a few seconds) is that can effect the visitors or the #SEO rating, by showing error pages like 500 or 404 etc ?

Side note: If you’re running gunicorn behind nginx, you can configure nginx to handle the 502 error (or any other error for that matter), with a custom page - or even a reference to a different application. (See [Configuring NGINX and NGINX Plus as a Web Server | NGINX Documentation](https://docs.nginx.com/nginx/admin-guide/web-server/web-server/#errors) for some ideas along those lines along with the details at [Module ngx\_http\_core\_module](https://nginx.org/en/docs/http/ngx_http_core_module.html#error_page.))
