internetarchive / internetarchive/openlibrary

Empty homepage cached on Solr request timeout

Open
#10,661 1 comment 0 reactions 1 assignee Claimed by @Alessandra005 View on GitHub
Lead: @jimchamp Priority: 3 Type: Bug
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 14h
Merged PRs (30d)
126

Description

### Problem

Solr requests sometimes time-out while the homepage is rendering. When this happens, an empty homepage is cached and served for at least 5 minutes.

![Image](https://github.com/user-attachments/assets/6ae54bf8-1791-4931-aad3-4eecdaf7e872)
_Homepage view when Solr request times out._

![Image](https://github.com/user-attachments/assets/bc33c638-6622-449d-b406-6209d377d931)
_After refreshing the page._

### Reproducing the bug

This one will be tricky to reproduce. Perhaps the homepage Solr calls could be artificially caused to time-out? I was unable to trigger this error on testing, and was incredibly lucky to have witnessed it on production.

### Context

- Browser (Chrome, Safari, Firefox, etc): Any
- OS (Windows, Mac, etc): Any
- Logged in (Y/N): N
- Environment (prod, dev, local): prod

### Breakdown

#### Requirements Checklist
* [ ]

#### Related files

*

#### Stakeholders

*


#### Instructions for Contributors

- Please [run these commands](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#working-on-your-branch) to ensure your repository is up to date **before** [creating a new branch](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#making-changes-and-creating-a-pull-request) to work on this issue and **each time after** pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.