-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Visiting local homepage too soon prevents classic books carousel from rendering #5473
Comments
@jimman2003 have you noticed this and do we possibly know of a good solution? Would love your feedback |
No...unfortunatly not |
In the past, it helped me to remove the solr volumes and rebuild the images... maybe try this? |
It seems that the database is being properly populated when a fresh Docker build is first started. The classic books carousel will not appear on the homepage in development environments if that page is opened too early after starting Docker. Since this page is cached, the carousel will still not appear after the page is refreshed. I've found that the carousel will be present if I wait until @RayBB suggested creating a dependency in the Docker startup that waits for Renaming this issue to better reflect what is actually happening, and lowering the priority as this is no longer blocking. |
Since this came up again I did some research. In short, we'll probably need to have a bash scrip that waits until home_1 exits and then starts the service on port 8080. Seems doable. I may look into it more tomorrow |
Upon closer examination the issue is a bit more complicated than expected. On my computer it takes about 30 seconds for
^^ the above lines run like a hundred times or so. It would seem one way to help with this issue is just speed up this reindexing. For me right now it takes 54 seconds . I figured that out by changind
So one way to improve that pops up right away is to let the two commands in So instead what I tried was using joblibs to spin up separate threads for the iterations of wkeys
However, I noticed what seems to be a good chunk of startup time between the two scripts that run in the makefile. This seemed to cut the time down to ~20 seconds with 16 threads. In this case the parallel part takes about 5 seconds. The whole These are my findings so far. I think this alone may be enough of an improvement that most users won't notice this issue anymore. I will open a PR later but for now here is my branch. Edit: wow okay on gitpod the times are even more drastic like less than 10 seconds for the reindex. |
Our database population scripts may not be running properly after Docker images are built. Books are not properly loaded and accessible on local Open Library instances until Docker is restarted at least once (and sometimes more than once).
Evidence / Screenshot (if possible)
Relevant url?
Steps to Reproduce
docker-compose up
db_1
logslocalhost:8080
. The classic books carousel should be missing if the data wasn't properly loaded.Details
Proposal & Constraints
Unfortunately, I currently don't have much information about this. The Docker build process is a little time consuming, so this will take awhile to troubleshoot. Here are some things that would be good to check while troubleshooting this:
db_1
db_1
and see if the tables exist and are populated. If they are, the db population scripts may be running too late in the start up sequence.Related files
Stakeholders
@RayBB
@cdrini
The text was updated successfully, but these errors were encountered: