Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Docker instance renders _very_ slowly at first #424

Open
dfabulich opened this issue Sep 3, 2024 · 1 comment
Open

The Docker instance renders _very_ slowly at first #424

dfabulich opened this issue Sep 3, 2024 · 1 comment
Labels
build/dev Issues concerning the build system or development environment

Comments

@dfabulich
Copy link
Contributor

  1. docker compose down && docker compose up --build
  2. Navigate to http://localhost:13000/

The page will take 60-90 seconds to load. My CPU usage is low. It seems like something's configured incorrectly.

Despite that, the Docker console logs say that everything rendered very quickly. For the 60-ish seconds that I'm waiting, there's no mention the console log that the GET request happened at all, until right at the very end, when it spits out this:

app-1  | '-------------------------------------+--------------------------------------'
app-1  |
app-1  | [info] IFComp powered by Catalyst 5.90131
app-1  | HTTP::Server::PSGI: Accepting connections at http://0:3000/
app-1  | [info] *** Request 1 (0.011/s) [25] [Tue Sep  3 20:26:17 2024] ***
app-1  | [debug] Path is "/"
app-1  | [debug] "GET" request for "/" from "192.168.65.1"
app-1  | [debug] Found sessionid "415df4dc1c2632574047f5f4d61dcc770cfca424" in cookie
app-1  | [debug] Deleting session(session expired)
app-1  | [debug] Rendering template "welcome.tt2"
app-1  | [debug] Response Code: 200; Content-Type: text/html; charset=utf-8; Content-Length: unknown
app-1  | [info] Request took 0.10964s (9.121/s)
app-1  | .------------------------------------------------------------+-----------.
app-1  | | Action                                                     | Time      |
app-1  | +------------------------------------------------------------+-----------+
app-1  | | /index                                                     | 0.002538s |
app-1  | | /end                                                       | 0.095822s |
app-1  | |  -> IFComp::View::HTML->process                            | 0.043914s |

But, that's not all.

  1. Click the "Sign in / Register" button in the header, taking you to http://localhost:13000/auth/login
  2. Sign in as [email protected] / fool
  3. Navigate to http://localhost:13000/comp/2024/cover_sheet

This page also takes 60-90 seconds to load, at least for the first three or four times you try to load it. Again, the Docker console is silent, until right at the end when it says everything happened quickly. Quiet CPU. No sign of what I'm waiting on.

app-1  | | Action                                                     | Time      |
app-1  | +------------------------------------------------------------+-----------+
app-1  | | /index                                                     | 0.000390s |
app-1  | | /end                                                       | 0.008615s |
app-1  | |  -> IFComp::View::HTML->process                            | 0.005051s |
app-1  | '------------------------------------------------------------+-----------'
app-1  |
app-1  | [info] *** Request 5 (0.016/s) [25] [Tue Sep  3 20:29:50 2024] ***
app-1  | [debug] Path is "/comp/cover_sheet"
app-1  | [debug] "GET" request for "comp/2024/cover_sheet" from "192.168.65.1"
app-1  | [debug] Found sessionid "cd5b9797d1855ff10d926c241e4e215819fc7973" in cookie
app-1  | [debug] Restored session "cd5b9797d1855ff10d926c241e4e215819fc7973"
app-1  | [debug] Role granted: curator
app-1  | [warn] No user_id_cookie_key configured! I will not set a userid cookie.
app-1  | [debug] Rendering template "comp/cover_sheet.tt"
app-1  | [debug] Response Code: 200; Content-Type: text/html; charset=utf-8; Content-Length: unknown
app-1  | [info] Request took 0.074532s (13.417/s)
app-1  | .------------------------------------------------------------+-----------.
app-1  | | Action                                                     | Time      |
app-1  | +------------------------------------------------------------+-----------+
app-1  | | /comp/fetch_comp                                           | 0.003006s |
app-1  | | /comp/cover_sheet                                          | 0.013168s |
app-1  | | /end                                                       | 0.049011s |
app-1  | |  -> IFComp::View::HTML->process                            | 0.047403s |
app-1  | '------------------------------------------------------------+-----------'
@mjmusante
Copy link
Collaborator

update: on slack, we discovered that it's much faster on dan's config to use the 8080 port (the "web" instance) instead of the 13000 port (the "app" instance)

@curiousdannii curiousdannii added the build/dev Issues concerning the build system or development environment label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/dev Issues concerning the build system or development environment
Projects
None yet
Development

No branches or pull requests

3 participants