Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Long connections and silent termination gets tabcmd stuck

オープン
#304 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
cli, networking

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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?

主要言語
Python
スター
52
フォーク
17
平均マージ
5日 20時間
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tableau/tabcmd のほかの issue

tableau/tabcmd の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。