Unable to push due to error: serviceRPC: Close: unexpected EOF #14655

Closed
opened 2025-11-02 11:19:09 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @veereshkhanorkar on GitHub (Jun 25, 2025).

Description

While attempting to push, I am receiving below error:

2025/06/25 14:52:27 modules/git/command.go:305:(*Command).run() [D] git.Command: git.Run(by:repo.serviceRPC, repo:.../test/test.git): /usr/bin/git ...global... receive-pack --stateless-rpc .../test/test.git
2025/06/25 14:52:27 modules/process/manager.go:178:(*Manager).Add() [T] Start 685bbfd3-4: git.Run(by:repo.serviceRPC, repo:.../test/test.git): /usr/bin/git ...global... receive-pack --stateless-rpc .../test/test.git (from 685bbfd3-3) (normal)
2025/06/25 14:52:30 .../eventsource/manager_run.go:46:(*Manager).Run() [T] Event source has no listeners
2025/06/25 14:52:30 .../eventsource/manager_run.go:56:(*Manager).Run() [T] Pausing the eventsource
2025/06/25 14:52:30 HTTPRequest [W] router: slow      POST /test/test.git/git-receive-pack for 10.0.12.2:0, elapsed 3458.8ms @ repo/githttp.go:479(repo.ServiceReceivePack)
2025/06/25 14:53:20 modules/process/manager.go:178:(*Manager).Add() [T] Start 685bc008: Cron: Start actions schedule tasks (normal)
2025/06/25 14:53:20 modules/process/manager.go:226:(*Manager).remove() [T] Done 685bc008: Cron: Start actions schedule tasks
2025/06/25 14:53:27 modules/git/command.go:354:(*Command).run() [D] slow git.Command.Run: /usr/bin/git ...global... receive-pack --stateless-rpc .../test/test.git (59.962210153s)
2025/06/25 14:53:27 modules/process/manager.go:226:(*Manager).remove() [T] Done 685bbfd3-4: git.Run(by:repo.serviceRPC, repo:.../test/test.git): /usr/bin/git ...global... receive-pack --stateless-rpc .../test/test.git
2025/06/25 14:53:27 routers/web/repo/githttp.go:414:serviceRPC.1() [E] serviceRPC: Close: unexpected EOF
2025/06/25 14:53:27 HTTPRequest [I] router: completed POST /test/test.git/git-receive-pack for 10.0.12.2:0, 0  in 60003.3ms @ repo/githttp.go:479(repo.ServiceReceivePack)
2025/06/25 14:53:27 modules/process/manager.go:226:(*Manager).remove() [T] Done 685bbfd3-3: HTTP: POST /test/test.git/git-receive-pack

Gitea Version

1.24.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/veereshkhanorkar/93ac1834f9d1e01233e32f9fb239f5f7
https://gist.github.com/veereshkhanorkar/8ea2a5d060cc16aec07d4c70ce1426f5

Screenshots

No response

Git Version

git version 2.43.0

Operating System

Ubuntu 24.0.4

How are you running Gitea?

I am running self hosted git

version: "2"

services:
  server:
    image: docker.gitea.com/gitea:1.24.2-rootless
    restart: always
    container_name: gitea
    deploy:
      resources:
        limits:
          cpus: 2
          memory: 600M

    env_file:
      - .env
    networks:
      - traefik
    volumes:
      - gitea-data:/var/lib/gitea
      - gitea-config:/etc/gitea
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    user: "1000:1000"
    ports:
      - "3012:3000"
      # - "2222:2222"
    labels:
        - "traefik.enable=true"

        - "traefik.http.routers.giteaweb.rule=Host(`git.dummy.com`)"
        - "traefik.http.routers.giteaweb.entrypoints=websecure"
        - "traefik.http.routers.giteaweb.tls=true"
        - "traefik.http.routers.giteaweb.tls.certResolver=cloudflare"
        - "traefik.http.routers.giteaweb.service=giteaweb"
        - "traefik.http.routers.giteaweb.service=giteaweb"
        - "traefik.http.services.giteaweb.loadbalancer.server.port=3000"
        # - "traefik.http.middlewares.giteaweb-buffer.buffering.maxRequestBodyBytes=268435456"

        # - "traefik.http.routers.giteassh.rule=Host(`git-ssh.dummy.com`)"
        # - "traefik.http.routers.giteassh.entrypoints=websecure"
        # - "traefik.http.routers.giteassh.tls=true"
        # - "traefik.http.routers.giteassh.tls.certResolver=cloudflare"
        # - "traefik.http.routers.giteassh.service=giteassh"
        # - "traefik.http.services.giteassh.loadbalancer.server.port=2222"
volumes:
  gitea-config:
    driver: local
    driver_opts:
      o: bind
      type: none
      device: /opt/containers/gitea/config
  gitea-data:
    driver: local
    driver_opts:
      o: bind
      type: none
      device: /opt/containers/gitea/data

networks:
  traefik:
    external: true

Database

None

Originally created by @veereshkhanorkar on GitHub (Jun 25, 2025). ### Description While attempting to push, I am receiving below error: ``` 2025/06/25 14:52:27 modules/git/command.go:305:(*Command).run() [D] git.Command: git.Run(by:repo.serviceRPC, repo:.../test/test.git): /usr/bin/git ...global... receive-pack --stateless-rpc .../test/test.git 2025/06/25 14:52:27 modules/process/manager.go:178:(*Manager).Add() [T] Start 685bbfd3-4: git.Run(by:repo.serviceRPC, repo:.../test/test.git): /usr/bin/git ...global... receive-pack --stateless-rpc .../test/test.git (from 685bbfd3-3) (normal) 2025/06/25 14:52:30 .../eventsource/manager_run.go:46:(*Manager).Run() [T] Event source has no listeners 2025/06/25 14:52:30 .../eventsource/manager_run.go:56:(*Manager).Run() [T] Pausing the eventsource 2025/06/25 14:52:30 HTTPRequest [W] router: slow POST /test/test.git/git-receive-pack for 10.0.12.2:0, elapsed 3458.8ms @ repo/githttp.go:479(repo.ServiceReceivePack) 2025/06/25 14:53:20 modules/process/manager.go:178:(*Manager).Add() [T] Start 685bc008: Cron: Start actions schedule tasks (normal) 2025/06/25 14:53:20 modules/process/manager.go:226:(*Manager).remove() [T] Done 685bc008: Cron: Start actions schedule tasks 2025/06/25 14:53:27 modules/git/command.go:354:(*Command).run() [D] slow git.Command.Run: /usr/bin/git ...global... receive-pack --stateless-rpc .../test/test.git (59.962210153s) 2025/06/25 14:53:27 modules/process/manager.go:226:(*Manager).remove() [T] Done 685bbfd3-4: git.Run(by:repo.serviceRPC, repo:.../test/test.git): /usr/bin/git ...global... receive-pack --stateless-rpc .../test/test.git 2025/06/25 14:53:27 routers/web/repo/githttp.go:414:serviceRPC.1() [E] serviceRPC: Close: unexpected EOF 2025/06/25 14:53:27 HTTPRequest [I] router: completed POST /test/test.git/git-receive-pack for 10.0.12.2:0, 0 in 60003.3ms @ repo/githttp.go:479(repo.ServiceReceivePack) 2025/06/25 14:53:27 modules/process/manager.go:226:(*Manager).remove() [T] Done 685bbfd3-3: HTTP: POST /test/test.git/git-receive-pack ``` ### Gitea Version 1.24.2 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/veereshkhanorkar/93ac1834f9d1e01233e32f9fb239f5f7 https://gist.github.com/veereshkhanorkar/8ea2a5d060cc16aec07d4c70ce1426f5 ### Screenshots _No response_ ### Git Version git version 2.43.0 ### Operating System Ubuntu 24.0.4 ### How are you running Gitea? I am running self hosted git ``` version: "2" services: server: image: docker.gitea.com/gitea:1.24.2-rootless restart: always container_name: gitea deploy: resources: limits: cpus: 2 memory: 600M env_file: - .env networks: - traefik volumes: - gitea-data:/var/lib/gitea - gitea-config:/etc/gitea - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro user: "1000:1000" ports: - "3012:3000" # - "2222:2222" labels: - "traefik.enable=true" - "traefik.http.routers.giteaweb.rule=Host(`git.dummy.com`)" - "traefik.http.routers.giteaweb.entrypoints=websecure" - "traefik.http.routers.giteaweb.tls=true" - "traefik.http.routers.giteaweb.tls.certResolver=cloudflare" - "traefik.http.routers.giteaweb.service=giteaweb" - "traefik.http.routers.giteaweb.service=giteaweb" - "traefik.http.services.giteaweb.loadbalancer.server.port=3000" # - "traefik.http.middlewares.giteaweb-buffer.buffering.maxRequestBodyBytes=268435456" # - "traefik.http.routers.giteassh.rule=Host(`git-ssh.dummy.com`)" # - "traefik.http.routers.giteassh.entrypoints=websecure" # - "traefik.http.routers.giteassh.tls=true" # - "traefik.http.routers.giteassh.tls.certResolver=cloudflare" # - "traefik.http.routers.giteassh.service=giteassh" # - "traefik.http.services.giteassh.loadbalancer.server.port=2222" volumes: gitea-config: driver: local driver_opts: o: bind type: none device: /opt/containers/gitea/config gitea-data: driver: local driver_opts: o: bind type: none device: /opt/containers/gitea/data networks: traefik: external: true ``` ### Database None
GiteaMirror added the issue/needs-feedback label 2025-11-02 11:19:09 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jun 25, 2025):

Usually it's a network problem or caused by client.


I see the log "error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504": 504 is a reverse proxy error: gateway timeout. Your reverse proxy terminated the connection too early, considering the slow git operation as "timeout"

@wxiaoguang commented on GitHub (Jun 25, 2025): Usually it's a network problem or caused by client. ---- I see the log "error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504": 504 is a reverse proxy error: gateway timeout. Your reverse proxy terminated the connection too early, considering the slow git operation as "timeout"
Author
Owner

@veereshkhanorkar commented on GitHub (Jun 25, 2025):

Fixed using below in traefik:

      - "--entryPoints.websecure.transport.respondingTimeouts.readTimeout=0s"
@veereshkhanorkar commented on GitHub (Jun 25, 2025): Fixed using below in traefik: ``` - "--entryPoints.websecure.transport.respondingTimeouts.readTimeout=0s" ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14655