Hello everyone, I noticed some that seems odd with...
# lucee
s
Hello everyone, I noticed some that seems odd with Lucee 6.1.0.243. We are running multiple applications on the same server in AWS and when we have "Component path is cached and not resolved again" checked if we load a cfc from site 1 called myfunctions.cfc and then load site 2 which also has a myfunctions.cfc but the functions inside those two cfcs are different site 2 tries to load site 1 myfunctions.cfc which of course breaks site 2 because its trying to load a function from that myfunctions.cfc that does not exist in the site 1 cfc only in the site 2 cfc. In version 5 this is not an issue each site loads their unique cfc's even if the names are the same. Is this a known issue? I have unchecked "Component path is cached and not resolved again" on the test server and everything is working fine. Is there another way to address this or is it a configuration issue? LMK Thanks
z
Are you using mod_cfml? Are you running in single mode or multi mode?
s
Hey Zackster, I am told we are running in single mode when I login to the Lucee Admin I have just one screen.
z
Do you see multiple contexts listed at the bottom of the admin overview page?
This is with tomcat yeah?
s
Yes on tomcat
I do see 5 contexts
z
That's good
Under the cfclasses folder are you seeing the paths for each different site?
s
Where would that be located?
z
Under lucee-server/context
s
I dont have access to the actual server only access to the Lucee Admin
z
For shits n giggles can you try 6.2.1.114 on the test server?
s
Yeah, I was going to ask them to install that and see
It seems like a configuration issue to be honest but I did not setup the server
I wanted to make sure its not a Lucee bug but its really a config issue.
Thanks for your time today!
z
Could be a bug
👍 1
can you see if https://docs.lucee.org/reference/functions/componentcachelist.html shares any clues? I have this repo which runs up lucee with two hosts and runs some tests, I can't repo the problem, maybe you can fork it and see if you can reproduce it? https://github.com/zspitzer/lucee-single-mode-test/actions/runs/14487248803
s
Hey zackster I figured it out. When they setup the server all the sites are using the same config instead of there own. In the web context instead of mapping each site to their own for example /var/www/docroot/site1.com/WEB-INF/lucee/.CFConfig.json /var/www/docroot/site2.com/WEB-INF/lucee/.CFConfig.json All the sites were using the same /opt.lucee.context/random-number-string-value/.CFConfig.json Once I corrected that the cfc caching issue was fixed. ComponentCacheList( ); Assisted in seeing the actual paths which was great! Thanks for the info! Going forward and looking at Lucee 7, Seeing how it will only offer single mode if we are going to host multi-sites I believe calling each one based on their unique sites would work example _my_Init_ = new cgi.http_host_.cfc.my_functions(); So even if I have myfunctions on two sites it will know which one to load even if its cached. Thoughts? Thanks Again
z
Ah I thought you were facing that problem in single mode? Everything is path based so it all should be fine, you just need to use unique application names, which is where the CGI host name can be helpful
👍 1