Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Long connections and silent termination gets tabcmd stuck

Abierto
#304 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
cli, networking

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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?

Lenguaje dominante
Python
Estrellas
52
Forks
17
Merge medio
5 d 20 h
PR fusionados (30 d)
2

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de tableau/tabcmd

Todos los issues de tableau/tabcmd

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.