Gitlay returns "500" while searching in huge files
If Gitaly has to search in big *.CSV files, it will return an error.
from my GDK. Of course, this happens on on gitlab.com too.
You can test it in my public test repo (opens the search)
The problematic file is - obviously - this 13 MB slp2016.csv
Gitaly debug log
17:24:14 gitaly.1 | time="2018-10-12T17:24:14+02:00" level=info msg="finished streaming call" error="rpc error: code = Canceled desc = rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.meta.auth_version=v2 grpc.meta.client_name=gitlab-web grpc.method=SearchFilesByContent grpc.request.fullMethod=/gitaly.RepositoryService/SearchFilesByContent grpc.request.glRepository=project-14 grpc.request.repoPath=@hashed/85/27/8527a891e224136950ff32ca212b45bc93f69fbb801c3b1ebedac52775f99e61.git grpc.request.repoStorage=default grpc.request.topLevelGroup=@hashed grpc.service=gitaly.RepositoryService grpc.time_ms=1001 peer.address= span.kind=server system=grpc
17:24:14 gitaly.1 | time="2018-10-12T17:24:14+02:00" level=debug msg="spawn complete" args="[/usr/local/bin/git --git-dir /Users/renehennig/GitLab/gitlab-development-kit/gdk-ce/repositories/@hashed/85/27/8527a891e224136950ff32ca212b45bc93f69fbb801c3b1ebedac52775f99e61.git grep --ignore-case -I --line-number --null --before-context 2 --after-context 2 --extended-regexp -e 1234 master]" command.exitCode=-1 command.inblock=0 command.maxrss=111476736 command.oublock=0 command.real_time_ms=1022.398827 command.system_time_ms=144.332 command.user_time_ms=417.351 grpc.meta.auth_version=v2 grpc.meta.client_name=gitlab-web grpc.method=SearchFilesByContent grpc.request.fullMethod=/gitaly.RepositoryService/SearchFilesByContent grpc.request.glRepository=project-14 grpc.request.repoPath=@hashed/85/27/8527a891e224136950ff32ca212b45bc93f69fbb801c3b1ebedac52775f99e61.git grpc.request.repoStorage=default grpc.request.topLevelGroup=@hashed grpc.service=gitaly.RepositoryService path=/usr/local/bin/git peer.address= pid=16352 span.kind=server system=grpc