Housekeeping of PKG_XXXX files
SASjs server appears to be missing a housekeeping process - a number of directories are being created in the /tmp folder that are not being removed, see:
Expanding one of these folders, there are numerous files:
Each of which contains a SAS program:
Perhaps it's in relation to the deployment process?
Turns out it must be in relation to the web server - I deleted a bunch of the files and the web apps stopped working!
Perhaps the files can be given more meaninful names, and their presence documented in the developer notes on https://server.sasjs.io ?
files in ./pkg-* are additional files required by our package and part of final executable.
See: https://github.com/sasjs/server/blob/main/api/package.json#L30
Refs:
- https://github.com/vercel/pkg/issues/1606#issuecomment-1112015226
- https://stackoverflow.com/a/27049546/12118530
We cannot explicitly delete these folders,
- other execution which are in-progress depend on these,
- cannot identify which other in-progress execution is mapped to which folder,
- and let these be auto delete by system ( via cronjob OR reboot )
I see. Not ideal - the number of /tmp directories it created for the client was substantial, over a short time period also.
Reboot isn't really an option for a shared environment, nor is cronjob (how can we know which files to remove).
Let's keep this issue open until we have the capacity / resource to assist the aforementioned project with a pull request.