I trust everyone is doing well. We’re currently in the midst of transitioning our CF applications to Lucee. I have a few questions to ask. Thanks in advance.
OS : Windows Server 2019 Datacenter 64bit Java Version : 11.0.20 Tomcat Version : 9 Lucee Version : 5.4.3.2 DB : MySQL Sync: SyncThing - For syncing folders across all nodes
All of our servers are load-balanced and application folders are synced in real time. I wanted to confirm/clarify that all WEB-INF folders can’t be replicated across all nodes as they are machine specific. Are there any other folders I should be avoiding during sync? Thanks
We have the below folder structure. Each app folder may contain 2 WEB-INF folders.
Application Folder 1
WEB-INF
api
WEB-INF
Application Folder 2
WEB-INF
api
WEB-INF
Application Folder 3
WEB-INF
api
WEB-INF
My other question is regarding the 1-second delay, I have applied the address="::1" to the <Connector protocol="AJP/1.3"> element but still no luck. I have even tried a few additional ones.
I have just recalled that there was an entry on github about that… That the ::1 solution only worked with IPv6 Interface activated. Can you check if this applies to you? Also, I remember that @carehart had some intetsting findings.
Please see this thread. Don’t know if have seen it already (read i it completely):
Julian, yes, there CAN be two. See the end of the thread that Andreas pointed to in his comment above.
Tanvir, why (in your example above showing two) do you have the address (and some other attributes) only in the second? Duplicate the second, and have one as ::1 and one as 127.0.0.1.
Or just have one that uses 127.0.0.1. You don’t show yet that you’ve used it at all yet.
Finally, as for why some need one, the others, or both, see that other thread where I’d shared more. As for what address’s one may need and why, or why it is that this delay happens when it’s not the “correct” value, I never got around to a blog post where I’d dig into and document more. If anyone’s motivated, the community would thank you–well, maybe.
You’re saying you’ve tried each one alone also, and always have the “1-second delay” you refer to at the outset?
And you’re restarting Lucee between changes and tests, right?
And I assume you’ve used the Lucee installer, rather than installing a Lucee war on a Tomcat you installed, right?
Can you confirm that the server.xml you’re changing is indeed the right one, by introducing an error (such as leaving off the opening < of that connector line), which should either prevent Lucee starting or at least prevent your test page running at all?
Do you have anything at all confirming that the “1-second delay” is not in your app itself? Debugging output? Logging? FusionReactor?
One of your later comments indicate you’re using IIS. You’ve not clarified, but I assume you’re using the boncode connector, right?
Have you setup all this the same way (iis talking to Lucee, installed the same way) on some development machine or VM? I’m wondering if you’d see this delay there. And if not, we’d wonder what was different. (Even if you may prefer to use Commandbox on your local machine, you can certainly install Lucee separately from that–and there can certainly be benefit, as in this case, for more closely mimicking that other server.)
Finally, about your other two questions (about syncing files and about Java settings), they’re being lost in all this. You should consider breaking this into it’s own, same with your last one about Java.(The current title relates to the sync aspect, at least in part, and it’s not clear if that has any connection to any performance issue.)
You’re saying you’ve tried each one alone also, and always have the “1-second delay” you refer to at the outset? - That’s correct
And you’re restarting Lucee between changes and tests, right? - I am indeed, sometimes even twice
And I assume you’ve used the Lucee installer, rather than installing a Lucee war on a Tomcat you installed, right? - I used the Lucee installer
Can you confirm that the server.xml you’re changing is indeed the right one, by introducing an error (such as leaving off the opening < of that connector line), which should either prevent Lucee starting or at least prevent your test page running at all? - I wondered as well and did the same and it errors so I was changing the correct file
Do you have anything at all confirming that the “1-second delay” is not in your app itself? Debugging output? Logging? FusionReactor? - For now I am just outputting #now()# there is nothing else in the file, in the network console the TTFB is most of the time 1.2 or 1.3 seconds, if I run the same file in CF it’s 60ms
One of your later comments indicate you’re using IIS. You’ve not clarified, but I assume you’re using the boncode connector, right? - Sorry It’s IIS with boncode connector
Have you setup all this the same way (iis talking to Lucee, installed the same way) on some development machine or VM? I’m wondering if you’d see this delay there. And if not, we’d wonder what was different. (Even if you may prefer to use Commandbox on your local machine, you can certainly install Lucee separately from that–and there can certainly be benefit, as in this case, for more closely mimicking that other server.) - Currently I have Lucee, IIS on the same VPS
I will start a separate thread for my other 2 questions. Thanks
Thanks for all the clarifications, though on the last point I think you misunderstood my intention. Please read it again and ask if you need me to reword/clarify it.
Also, in your boncode settings file (if you use one), is the server element set to localhost or to something else?
And what do you get when you ping localhost (on the windows machine)?
Have you tried setting that server element of the boncode settings file to be 127.0.0.1 or ::1? I’m not saying you should have to: it’s just a diagnostic. See the boncode docs for what I mean by that server element, including the section above the place where that link will take you in the large doc page.
And you may need to restart iis (or recycle the app pool processing the request) for such settings file changes to take effect–I didn’t see that clarified in the docs, but they are substantial. Perhaps Bilal or someone else can confirm.
Note that the docs DO propose one OTHER possible contributor to slowness can be the use of the secret in the connector (required by default in tomcat since the ghostcat fiasco of early 2021). Bilal proposes one can consider using requiredSecret=”false” on the server.xml connector line. See the brief docs discussion of this for more at the bottom of the troubleshooting table.
I realize these are all shots in the dark. There should be more clarity by studying the logs, whether tomcat’s or boncode one’s you can enable, as also discussed in the docs.
(2) Ensure that the values of the connector attributes match the respective values in the workers.properties file of the worker concerned. Using the above data, for example,
In this example, the connector is used by just the one worker, WorkerName. Hence, maxThreads represents the total connection pool size.
However, suppose three workers, worker1, worker2 and worker3 share the above connector. Then maxThreads represents the maximum value of the sum of their respective pool sizes. With maxThreads=1000, you would then have, for example, worker.worker1.connection_pool_size=300, worker.worker2.connection_pool_size=300, worker.worker3.connection_pool_size=400.
You should also ensure that, for each worker, worker.workerName.max_reuse_connections never exceeds worker.workerName.connection_pool_size.