The cause of this problem can be a timeout issue (or similar limit, e.g. amount of data): A server-side timeout occurs, which closes the http connection, resulting in the client-side "early EOF" error message. Such timeouts can be configured in several places (I'm listing them here because other web servers may have similar settings, so they might give you a hint where to look):
- Apache's Timeout determines the time of absolute silence (i.e. no data transmitted), before the connection is severed. Since data was received continuously, this was not the problem here.
- Apache mod_proxy's ProxyTimeout is a specialized setting of the afore-mentioned Timeout. Again, since it is not a limit for the total request time, it was not the problem here.
- Apache can limit the size of a POST request using LimitRequestBody; the default is no limit, but this may vary in your distribution's configuration
- gitlab's Unicorn configuration example suggests a timeout of 30 seconds. This is an absolute timeout, e.g. every request taking longer than 30 seconds will be terminated.
Increasing the timeout in the Unicorn config should solve your problem. Keep in mind that the number of parallel requests is also limited by Unicorn. Cloning a large repo blocks one request, but causes almost no CPU load. If your gitlab server has no high traffic profile, you should consider increasing the worker_process
number.
As a sidenote: The gitlab.yml
configuration also offers a git timeout; this timeout limits git operations like calculating the diff of several commits. It has no impact on the timeout when cloning/pulling.