Skip to content

Disable autoreload in production dashboard, drop dead WSGI server property#956

Merged
SimonHeybrock merged 2 commits into
mainfrom
worktree-dashboard-autoreload-954
Jun 1, 2026
Merged

Disable autoreload in production dashboard, drop dead WSGI server property#956
SimonHeybrock merged 2 commits into
mainfrom
worktree-dashboard-autoreload-954

Conversation

@SimonHeybrock
Copy link
Copy Markdown
Member

@SimonHeybrock SimonHeybrock commented Jun 1, 2026

Summary

Dashboard.run_forever — the live production entry point — started Panel's server with autoreload=True, installing a periodic source-file watcher. py-spy profiling of the healthy Bifrost production dashboard showed this _check_file watcher consuming small baseline CPU on the server IOLoop, with no benefit in a deployed service. Autoreload is now tied to the dev flag (autoreload=self._dev), so it is active only for local development and off in production.

While here, the sibling server property is removed. It was a WSGI entry-point hook (application = _app.server) for gunicorn deployment. gunicorn and the *_wsgi.py modules were removed previously, leaving the property orphaned with no remaining call sites in the codebase. Removing it also eliminates the near-duplicate pn.serve(...) call whose divergent autoreload value was the root of this issue.

Fixes #954

🤖 Generated with Claude Code

…perty

run_forever is the live production entry point and hardcoded autoreload=True,
installing Panel's periodic file-watcher. py-spy profiling of the Bifrost
production dashboard showed it consuming ~11.6% of baseline CPU on the server
IOLoop with no benefit in production. Tie autoreload to the dev flag instead.

The sibling `server` property was a WSGI/gunicorn entry-point hook. gunicorn and
the *_wsgi.py modules were removed earlier, leaving it orphaned with no call
sites. Remove it.

Fixes #954

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@SimonHeybrock SimonHeybrock requested a review from MridulS June 1, 2026 07:53
@SimonHeybrock SimonHeybrock enabled auto-merge June 1, 2026 09:12
@SimonHeybrock SimonHeybrock merged commit a8b1f82 into main Jun 1, 2026
13 checks passed
@SimonHeybrock SimonHeybrock deleted the worktree-dashboard-autoreload-954 branch June 1, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard production server runs pn.serve(autoreload=True)

2 participants