[BUG]: Long loading of the compiler page behind a proxy server that restricts access to some Internet resources #1206
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What Happened?
I have a problem with the compiler. The page takes a very long time to load. This is found on both 5.0.3 and 5.1.0-rc4. It took 1400 seconds to load the compiler page, after clicking the compile button the page loaded in 2527 seconds. The compilation itself, according to the information from the page, took 4 seconds.
The bottleneck is afterRenderComponent com_componentbuilder (2.65MB) (2527.31s)
Joomla is installed on local machine via WSL (apache2 + mysql). On my machine access to the Internet is through a proxy server. A proxy server may restrict access to some IPs and domains.
Steps to reproduce the Bug
Simply click on the Compiler button in the ‘Components - ✓ Component Builder’ menu
Which Joomla version are you compiling in?
Joomla! 5.2.3 Stable [ Uthabiti ] 7-January-2025 16:00 GMT
Which PHP version are you compiling in?
8.3.6
Which Joomla versions are you targeting?
5.2.3
Which PHP version are you targeting?
5.2.3
Which Web server is JCB running on?
Apache 2.4
Which Relational Database is JCB running on?
Mysql 8.0
Which OS is JCB running on?
Ubuntu 24.04 via WSL
Which JCB version are you using?
5.1.0-rc4
Where in JCB did this issue occur?
Installation of a component, Compiler(admin_view)
On which browsers did you encounter the issue?
Firefox, Microsoft Edge
Additional Comments
No response
Detailed Flow of the Compiler and Page Loading
Initial Page Load:
When you click on the Compiler button in the Components - ✓ Component Builder menu, the compiler page begins loading. This page is built dynamically and includes not only the core compilation tools but also several visual and functional assets:
The page pulls in eye-catching banners from our internal system using a specific API call. You can review the code that retrieves the banner details here.
In addition to static images, the page loads JavaScript-driven elements like social feeds (from Joomla.Social) and other dynamic content. These external calls are initiated immediately after the page loads.
Compilation and Post-Render Process:
The actual component compilation process is swift (approximately 4 seconds). However, once the component is compiled, an
afterRenderComponent
process kicks in. This step is responsible for assembling additional data (roughly 2.65MB) and enriching the UI.During this phase, JCB:
It makes a call to our API at https://api.joomlacomponentbuilder.com/v1/network/community/jcb to check the status of various community and repository servers.
Our system is designed to be decentralized. If one server is unavailable—often due to DOS attacks targeting our infrastructure—the tool automatically attempts to connect to alternative servers. You can see the real-time status of these systems on our JCB status page.
Impact of the Proxy:
If you're running JCB behind a proxy that restricts or delays access to external domains, several issues may occur:
Calls to retrieve the banners, social feeds, or to check the server status (via the API) can be significantly slowed down. The proxy may block or delay these calls until a timeout occurs.
Although the compilation itself is fast, the cumulative delays from these external calls (especially those made during the
afterRenderComponent
phase) result in the compiler page taking an exceptionally long time to fully load.Environment and Recommendations:
We have determined that JCB works best in Firefox (or its variant LibreWolf). Microsoft Edge and Chrome are known to have compatibility issues.
JCB is a large application and our internal support is focused on Linux environments. For a consistent experience, we recommend using a Docker-based setup.
To facilitate this, our OctoJoom tool can help you deploy a Joomla environment using Docker. Although it currently runs on Mac and Ubuntu, you can generate Docker Compose files and run them on Windows as well.
If Docker isn’t an option, using a VPN instead of a restrictive proxy can often bypass these external call issues.
JCB’s Disruptive and Decentralized Nature:
JCB is built to be a disruptive service in the Joomla ecosystem—designed to operate without reliance on any single company (like GitHub) and to resist attempts by larger entities to limit its functionality.
Our engine leverages a decentralized network of community servers to ensure that the service remains online even under DOS attacks. This decentralized approach is part of our vision for a resilient and unstoppable tool.
Due to ongoing DOS attacks, we are considering moving the banner resource to another system to increase availability. Meanwhile, if you suspect that the banner calls are a significant factor in the delay, you can remove them to test the difference in load times.
In Summary
What’s Happening:
The delay in the compiler page is primarily due to external calls made after the core component compilation. These include fetching banners, social feeds, and server status checks through our API.
Proxy Impact:
A restrictive proxy can block or slow these calls, resulting in long load times even though the actual compilation is fast.
Recommendations:
Philosophy Behind JCB:
JCB is intentionally built as a disruptive, decentralized service. This design allows it to operate resiliently despite external pressures and DOS attacks, ensuring an "always online" experience through redundant fallback mechanisms.