Skip to content

Conversation

@elnelson575
Copy link
Contributor

@elnelson575 elnelson575 commented Sep 3, 2025

Related to: #2061 and #2070

This PR removes dirs created for JS and CSS inclusions from the tmp directory on application close.
example:
Screenshot 2025-09-04 at 10 23 43 AM

@elnelson575 elnelson575 linked an issue Sep 4, 2025 that may be closed by this pull request
@elnelson575 elnelson575 marked this pull request as ready for review September 4, 2025 14:30
@wch
Copy link
Collaborator

wch commented Sep 4, 2025

There can be multiple Python processes running the same app. For example, Connect and shinyapps.io have settings to control when to spawn a new process.

If I'm correctly understanding how temp dirs are created and how this PR works: If a temp directory is shared across multiple processes, then when the load decreases and the server stops one of the processes, then it would cause the shared temp directory be deleted, which could cause problems for the other process.

There's also the case of multiple App objects in the same process. Some of the pages on the Shiny web site have multiple Shinylive apps, and those all run in the same process, so if the user were to, say, edit and restart one of those apps, it would cause the shared temp dir to be deleted, which could cause problems.

@cpsievert
Copy link
Collaborator

@wch thanks for pointing this out. I suppose we could scope the include_js()/include_css() tempdirs to the process-level, but doing that also feels more trouble than it's worth at this point. I think we should probably just drop this and move on, sorry @elnelson575.

@cpsievert cpsievert closed this Sep 5, 2025
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.

[Bug]: Conflict in multi-user systems with ui.include_*

3 participants