Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Long connections and silent termination gets tabcmd stuck

Aperta
#304 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
cli, networking

Direzione di ricerca

Start by locating the Python HTTP session or adapter used for PDF downloads and reproduce a 5–10 minute request. Investigate how socket keep-alive options can be applied there, then verify that a silently terminated connection does not leave tabcmd waiting forever.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

We faced network issue when waiting for PDF to download/generate (takes 5-10min), because TCP connection waiting too long and no packets being sent in TCP. In our case connection is terminated without RST meaning tabcmd gets stuck in waiting for pdf download forever, unfortunately this behaviour is out of our control in our case.

One way to avoid such problem would be enable KEEP_ALIVE on the socket in client side, example:

import requests
import socket

class HTTPAdapterWithSocketOptions(requests.adapters.HTTPAdapter):
    def __init__(self, *args, **kwargs):
        self.socket_options = kwargs.pop("socket_options", None)
        super(HTTPAdapterWithSocketOptions, self).__init__(*args, **kwargs)

    def init_poolmanager(self, *args, **kwargs):
        if self.socket_options is not None:
            kwargs["socket_options"] = self.socket_options
        super(HTTPAdapterWithSocketOptions, self).init_poolmanager(*args, **kwargs)

adapter_with_options = HTTPAdapterWithSocketOptions(socket_options=[(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)])

session = requests.Session()
session.mount(adapter_with_options)

I there possibility to add such option or any suggestion how we can avoid this problem?

Lingua principale
Python
Stelle
52
Fork
17
Merge medio
5g 20h
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tableau/tabcmd

Tutte le issue di tableau/tabcmd

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.