Option to add a timeout for ping
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start at the library's ping implementation and compare how connect, reading, and writing timeouts are handled. Review the interaction described with SQLAlchemy's pool_pre_ping option; done means callers can configure a distinct ping timeout without changing normal read/write timeout behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The pymsql library currently supports a timeout for connect, reading, and writing, but there isn't a specific timeout for ping.
There's an interesting interaction between this library and a more high-level one, such as sqlalchemy. Many of the default classes for connection pools in sqlalchemy often allow for a pool_pre_ping option, which will ping the connection while checking it out of the pool. If the connection does not respond or is determined to be unconnected, then the pool will fetch a brand new connection.
Conceptually, this pre-pinging is essentially acting as a connect, however there is no way to timeout quickly if the connection is hangs or is in a bad state. One could set the read/write timeout to be low, but in practice this is difficult to do, as once a transaction is open or a connection is in use, then its reasonable to tolerate some read/write lag.
While it isn't necessarily the responsibility of this library to provide a ping that uses the connect timeout, it would be great to have an option to do so.
- Lingua principale
- Python
- Stelle
- 7.8k
- Fork
- 1.4k
- Merge medio
- 5h 40m
- PR unite (30g)
- 5
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PyMySQL/PyMySQL
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
-
Compression ApertaFeature Request Priority-High
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
-
cursor.mogrify_many() ApertaFeature Request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Feature Request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Tutte le issue di PyMySQL/PyMySQL
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
🐛 Bug 🔔 Pending processing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
jumpserver/jumpserver#17584 ·