• 请不要在回答技术问题时复制粘贴 AI 生成的内容
pureGirl
V2EX  ›  程序员

windows 上启动的定时任务运行一段时间就会报错

  •  
  •   pureGirl · Aug 4, 2025 · 1728 views
    This topic created in 290 days ago, the information mentioned may be changed or developed.

    这个是系统的问题,还是我程序写的问题,试了好多方法都解决不了。麻烦大佬们帮看看。

    查询待处理记录失败: (2003, "Can't connect to MySQL server on 'bj-cdb.sql.tencentcdb.com' ([WinError 10055] 由于系统缓冲区空间不足或队列已满,不能执行套接字上的操作。)") 定时抓取 --- 2025-08-04 09:12:00 结束 查询记录失败: (2003, "Can't connect to MySQL server on 'bj-cdb.sql.tencentcdb.com' ([WinError 10055] 由于系统缓冲区空间不足或队列已满,不能执行套接字上的操作。)")

    5 replies    2025-08-04 10:23:55 +08:00
    i8086
        1
    i8086  
       Aug 4, 2025
    首先楼主没说明这个程序是做什么用,也没部分源码可看。

    仅从错误信息来看,可以理解 TCP 连接过多,导致端口耗尽。
    hzz2
        2
    hzz2  
       Aug 4, 2025
    试试之前写的小工具 https://github.com/hezhizheng/go-crontab
    ShinichiYao
        3
    ShinichiYao  
       Aug 4, 2025
    没开连接池吧
    penisulaS
        4
    penisulaS  
       Aug 4, 2025
    上万个端口都耗尽了吗
    pureGirl
        5
    pureGirl  
    OP
       Aug 4, 2025
    @ShinichiYao 是的,刚改成连接池了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3755 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 96ms · UTC 00:48 · PVG 08:48 · LAX 17:48 · JFK 20:48
    ♥ Do have faith in what you're doing.