gitblit-org / gitblit

pure java git solution
http://gitblit.com
Apache License 2.0
2.28k stars 670 forks source link

com.gitblit.utils.FileUtils.folderSize issue #1406

Closed dididudu998 closed 2 years ago

dididudu998 commented 2 years ago

Hi Team,

I got below message today.

gitblit works great in the last 3 years, this issue is the first problem I met.

that my repo folder size is more than 10GB. now is 10.4GB. (I have some pictures in the repo).

Please let me know, may the gitblit have folder size limits, and how can I override it?

Thanks!

2022-01-03 20:50:05 [WARN ] Failed startup of context o.e.j.w.WebAppContext@172b9b6{/,file:/D:/gitblit-1.9.1/gitblit-1.9.1/data/temp/webapp/,STARTING}{file:/D:/gitblit-1.9.1/gitblit-1.9.1/gitblit.jar} java.lang.NullPointerException at com.gitblit.utils.FileUtils.folderSize(FileUtils.java:220) at com.gitblit.utils.FileUtils.folderSize(FileUtils.java:221) at com.gitblit.utils.FileUtils.folderSize(FileUtils.java:221) at com.gitblit.utils.FileUtils.folderSize(FileUtils.java:221) at com.gitblit.manager.RepositoryManager.updateLastChangeFields(RepositoryManager.java:1198) at com.gitblit.manager.RepositoryManager.loadRepositoryModel(RepositoryManager.java:960)

flaix commented 2 years ago

What was the action that triggered this error?

There is no folder size limits imposed, other than the natural limit of a long value, but that is not what is happening here. This code is descending into directories, but I am not sure how this NullPointerException could ever happen.

Do you maybe have very deep directory structures? Or very large directories?

dididudu998 commented 2 years ago

What was the action that triggered this error?

There is no folder size limits imposed, other than the natural limit of a long value, but that is not what is happening here. This code is descending into directories, but I am not sure how this NullPointerException could ever happen.

Do you maybe have very deep directory structures? Or very large directories?

Hi flaix,

after windows 10 auto update and reboot, I login and start gitblit, the exception happened in the command line window.

there is a repo folder over 4GB.

I will try shrink the data size later.

Thanks!

flaix commented 2 years ago

Is this persisting, i.e. every time you start Gitblit? Does it still start or is operation impaired now?

dididudu998 commented 2 years ago

Is this persisting, i.e. every time you start Gitblit? Does it still start or is operation impaired now?

just test to store to a new folder and start gitblit. it works.

git.repositoriesFolder=G:\my_repo

git.repositoriesFolder=G:\repo_test

I create a new folder to store my repo, it works. if I change the folder to the old one , the error appears. it may be caused by a folder structure or folder size.

dididudu998 commented 2 years ago

Is this persisting, i.e. every time you start Gitblit? Does it still start or is operation impaired now?

just test to store to a new folder and start gitblit. it works.

git.repositoriesFolder=G:\my_repo

git.repositoriesFolder=G:\repo_test

I create a new folder to store my repo, it works. if I change the folder to the old one , the error appears. it may be caused by a folder structure or folder size.

the error appear after Identifying repositories.... I do not know where to find the detail logs for this step.

dididudu998 commented 2 years ago

from now on the problem solved.

select some valuable repo folder, copy from the old root folder(g:\my_repo) to another root folder(g:\myrepos), change the git.repositoriesFolder value, start gitblit.cmd, it come back.

it should be a windows issue, not gitblit.

thanks all!