Skip to content

Instantly share code, notes, and snippets.

@Jeremie-Chauvel
Created February 17, 2025 14:50
Show Gist options
  • Select an option

  • Save Jeremie-Chauvel/f6006f4b7259a5304eadd752f261509e to your computer and use it in GitHub Desktop.

Select an option

Save Jeremie-Chauvel/f6006f4b7259a5304eadd752f261509e to your computer and use it in GitHub Desktop.
Flask werkzeug detecting change and reloading without any edit of source files

Flask werkzeug detecting change and reloading without any edit of source files

TLDR

Update your Werkzeug version to the latest available (at the time of writing 3.1.3 solve the issue).

Long version

When running Flask locally through app.run(debug=True), I had a very strange issue of random reload of the local dev server when doing any request raising ConnectionError since the connection was aborted while restarting the server. The reload kept happening at every request because of source file change even through my editor was closed.

Investigating the issue briefly, it seems that it was caused by a bug in Werkzeug, updating it resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment