0

OS: Ubuntu 22.04 | CommandBox Version: 5.5.2 | Lucee Engine: 5.3.9+141

Having a really strange issue. I've installed CommandBox from scratch and am using the Lucee engine. Everything works fine until it's time to pull my web files from GitHub. Initially, all the files are served properly, but upon restarting the service, it is unable to start. I've tried a couple of things (changing user/group ownership, copying the files manually, even changing file permissions for the folder and everything inside) but it fails to start every single time.

I'm able to bring it up by deleting the web root folder and recreating it. I'm also able to run files that I create locally with echo/touch no problem. Kind of at a loss here as to where to go from here.

MTut
  • 35
  • 2
  • What do the logs say? – AndreasRu Aug 24 '22 at 16:16
  • Nothing useful, just stops at "Creating deployment [default] in /path/to/webroot". After that, it just sits there and times out. – MTut Aug 24 '22 at 16:39
  • Start the server with the `--console --debug` flags and see if there is any error message or if it just hangs. If it is hanging on that message and just never finishing, it could be related to having a very large number of files in your webroot which can slow down a file watcher that's created on start. – Brad Wood Aug 24 '22 at 16:41
  • can you start the server (with files in the directory) using `start --console --debug` – ssteinbeck Aug 24 '22 at 16:42
  • Here's the output of debug console: `[INFO ] Runwar: Creating deployment [default] in /path/to/webroot [DEBUG] Runwar: Initialized CACHED MappedResourceManager - base: /path/to/webroot, web-inf: /root/.CommandBox/server/serverHome/lucee-5.3.9.141/WEB-INF, aliases: {} [DEBUG] Runwar: ResourceManager Cache total size: 50 MB [DEBUG] Runwar: ResourceManager Cache max file size: 50 KB ` For context, there are 1550 files in the webroot. – MTut Aug 24 '22 at 17:02
  • I'd also like to invite you to ask further CommandBox-related questions on the Ortus Community site which is much better suited for some back-and-froth conversation :) https://community.ortussolutions.com/ – Brad Wood Aug 24 '22 at 17:04
  • How many files are in `/path/to/webroot`? That log message is just some standard stuff so not very conclusive. – Brad Wood Aug 24 '22 at 17:05
  • Around 1550 files – MTut Aug 24 '22 at 17:06
  • Hmm, that's not a crazy amount, but probably enough to cause slowness. Chances are, the server will come up after a bit of a delay, but I'll post an answer below with a likely fix. – Brad Wood Aug 24 '22 at 17:07

1 Answers1

0

It sounds like the number of files in your web root are causing the XNIO directory watcher to take some time starting up. you can disable it like so:

server set runwar.args=['--resource-manager-file-system-watcher=false']

And the restart the server. Please note, this setting will actually be disabled by default in the next version of CommandBox due to occasional issues like this.

Brad Wood
  • 3,863
  • 16
  • 23
  • 1
    That's the ticket! Thank you, sorry for crosspost in CommandBox community – MTut Aug 24 '22 at 17:18
  • No worries. I'll gladly help you in either place, but I don't follow SO that closely and I dislike it as a good place for any sort of back-and-forth discussion to get to the bottom of an issue :) – Brad Wood Aug 24 '22 at 17:21