Long time for nginx to load after docker compose up
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 245
- PR merge metrics
- No merged PRs in 30d
Description
Using the latest commit (at time of writing) (b7c352f95bea1e43eae22b084db488ecca071132)
It seems to take a long time for nginx to start in the web container after docker compose up.
Jumping into the container and exploring logs and `ps aux` output shows nginx isn't loaded.
```
root@oncall:/home/oncall/var/run# cat /var/log/nginx/error.log
2024/12/12 00:31:36 [emerg] 365#365: open() "/home/oncall/daemons/nginx.conf,pidfile=/home/oncall/var/run/nginx.pid" failed (2: No such file or directory)
2024/12/12 00:33:02 [emerg] 374#374: open() "/home/oncall/daemons/nginx.conf,pidfile=/home/oncall/var/run/nginx.pid" failed (2: No such file or directory)
2024/12/12 00:33:48 [emerg] 382#382: open() "/home/oncall/daemons/nginx.conf,pidfile=/home/oncall/var/run/nginx.pid" failed (2: No such file or directory)
```
After some time (10s of minutes) nginx is able to start.
Not sure what other information might be helpful - please let me know if I can get any additional info to help track down the issue.
Contributor guide
Research direction
Reproduce the delay with `docker compose up`, then inspect the web container startup and the nginx error log at `/var/log/nginx/error.log`. Trace how `/home/oncall/daemons/nginx.conf,pidfile=/home/oncall/var/run/nginx.pid` is being passed and consider the issue resolved when nginx starts promptly without repeated file-not-found errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, nginx
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100