Nine to Ten Minute Wait After uvicorn app.main:fast_api Started Before Successful Responses
- Dominant language
- Rust
- Stars
- 175
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
- EdgeDB CLI 2.0.5+f78cf34
- OS Version SLES12 SUSE Linux Enterprise Server 12 SP5 700G 36 core machine
A uvicorn process was started and httpx requests to it failed with a ReadTimeout
After about ten minutes an httpx request was successful.
It took one minute after uvicorn was started before the .../bin/postgres process started .
It then then took nine more minutes before the other postgress processes started allowing, I assume for httpx requests to be successful.
I doubt this behavior is normal.
o Are there system setups related to systemd or postgres that need to be done or modified?
o Are there any logs or a verbose mode to allow for debugging either of these delay issues?
o Is this a known issue?
```
$ uvicorn app.main:fast_api --host 'localhost' --port 5000 --reload --log-level 'debug'
$ httpx -m GET http://localhost:5000/users
ReadTimeout: timed out
```
After about 10 minutes:
```
$ httpx -m GET http://localhost:5000/users
TTP/1.1 200 OK
date: Fri, 28 Oct 2022 21:57:40 GMT
server: uvicorn
content-length: 2
content-type: application/json
[]
$ ps -eaF | egrep -i 'edge|postg|corn' | grep -v grep
nshelley 6457 26335 41 26659 24444 29 14:43 pts/111 00:06:06 ...fastapi-crudOCT29/venv/bin/python3.10 ...fastapi-crudOCT29/venv/bin/uvicorn app.main:fast_api --host localhost --port 5000 --reload --log-level debug
nshelley 6458 6457 0 12009 10640 23 14:43 pts/111 00:00:00 ...fastapi-crudOCT29/venv/bin/python3.10 -c from multiprocessing.resource_tracker import main;main(4)
nshelley 6459 6457 0 52339 40156 21 14:43 pts/111 00:00:01 ...fastapi-crudOCT29/venv/bin/python3.10 -c from multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=5, pipe_handle=7) --multiprocessing-fork
nshelley 6669 31114 0 63867 233684 5 14:44 ? 00:00:03 /~/.local/share/edgedb/portable/2.5/bin/python3 -I /~/.local/share/edgedb/portable/2.5/bin/edgedb-server.py --data-dir ~/.local/share/edgedb/data/fastapi_crudOCT29 --runstate-dir /run/user/12050573/edgedb-fasta httpx -m POST http://localhost:5000/events \
--json '{pi_crudOCT29 --port 10704 --compiler-pool-mode=on_demand --admin-ui=enabled --auto-shutdown-after=600
nshelley 13397 6669 0 283969 524036 15 14:53 ? 00:00:00 /~/.local/share/edgedb/portable/2.5/bin/postgres -D ~/.local/share/edgedb/data/fastapi_crudOCT29 -c listen_addresses= -c unix_socket_permissions=0700 -c unix_socket_directories=/run/user/12050573/edgedb-fastapi_crudOCT29 -c max_connections=7725 -c max_locks_per_transaction=256 -c log_min_messages=NOTICE -c log_statement=none -c log_line_prefix=
nshelley 13399 13397 0 284483 25364 29 14:53 ? 00:00:00 postgres: checkpointer
nshelley 13400 13397 0 284461 26324 5 14:53 ? 00:00:00 postgres: background writer
nshelley 13401 13397 0 283969 9268 14 14:53 ? 00:00:00 postgres: walwriter
nshelley 13402 13397 0 285523 8172 12 14:53 ? 00:00:00 postgres: autovacuum launcher
nshelley 13403 13397 0 16603 5272 2 14:53 ? 00:00:00 postgres: stats collector
nshelley 13404 13397 0 285492 6304 22 14:53 ? 00:00:00 postgres: logical replication launcher
nshelley 13434 13397 0 288543 58248 7 14:53 ? 00:00:00 postgres: postgres V2f147ded60___edgedbsys__ [local] idle
nshelley 13452 6669 0 53070 192872 13 14:53 ? 00:00:01 /~/.local/share/edgedb/portable/2.5/bin/python3 -I -m edb.server.compiler_pool.worker --sockname /run/user/12050573/edgedb-fastapi_crudOCT29/_5erf7mc/ipc --version-serial 0
nshelley 17452 13397 0 293628 95984 0 14:57 ? 00:00:00 postgres: postgres V2f147ded60_edgedb [local] idle
nshelley 17459 13397 0 285741 25360 17 14:57 ? 00:00:00 postgres: postgres V2f147ded60_edgedb [local] idle
```
====
A few days previously a similar delay was noticed when doing an **edgedb project init**:
```
$ cd quickstart
$ time edgedb project init
No edgedb.toml found in .../work/EdgeDB/quickstart29OCT or above
Do you want to initialize a new project? [Y/n]
Y
Specify the name of EdgeDB instance to use with this project [default: quickstart29OCT]:
quickstart29OCT
Checking EdgeDB versions...
Specify the version of EdgeDB to use with this project [default: 2.5]:
2.5
Project directory \u2502 .../work/EdgeDB/quickstart29OCT
Project config \u2502 .../work/EdgeDB/quickstart29OCT/edgedb.toml
Schema dir (empty) \u2502 .../work/EdgeDB/quickstart29OCT/dbschema
Installation method \u2502 portable package
Version \u2502 2.5+57f7823
Instance name \u2502 quickstart29OCT
Version 2.5+57f7823 is already installed
Initializing EdgeDB instance...
[systemctl] Created symlink from ~/.config/systemd/user/default.target.wants/edgedb-server@quickstart29OCT.socket to .../.config/systemd/user/edgedb-server@quickstart29OCT.socket.
[systemctl] Created symlink from ~/.config/systemd/user/default.target.wants/edgedb-server@quickstart29OCT.service to .../.config/systemd/user/edgedb-server@quickstart29OCT.service.
Applying migrations...
Everything is up to date. Revision initial
Project initialized.
To connect to quickstart29OCT, run edgedb
real 9m28.811s
user 0m28.603s
sys 0m6.358s
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.