-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 502 after version upgrade #8041
Comments
That is working, when I downgrade back to Gitea version 1.8.3 built with go1.12.5 : bindata, sqlite, sqlite_unlock_notify from the new Gitea version 1.9.2 built with GNU Make 4.1, go1.12.9 : bindata, sqlite, sqlite_unlock_notify. |
Any error logs? |
I can't see any errors in log folder. Where should I see it? |
It should be <gitea_home_dir>/logs . |
I have the same problem. The process is still visible, but getting a 502. Fun fact: When restarting, it may work, for some minutes, or even an hour. last lines from gitea.log:
|
I cannot tell if this was like this before, but it seems like it's consuming much more resources:
We are two users on it, so very low traffic. Getting a constant 3.5% CPU usage on a huge server. One reason could be the server upgrade to Debian 10. But really no clue how? @lunny how could we activate a debug log? I have |
@lunny : I can't find any relevant log from that period of time. |
will dig into the LOG section, here: https://docs.gitea.io/en-us/config-cheat-sheet/ :-)= |
Same here using the image gitea:1.9 with mysql, http is returning 502 and ssh tells me
and no log or error messages are produced |
it's all very vague. I understand that there is no diagnose possible, this way. all I can tell is that resource usage went quite up. are there any unit tests, that check for such scenarios? in my case, it looks like the problem is gone, after I deactivated another systemd service that has gone wild..still very vague. |
@benzkji For high resource usage it may be the bleve index rebuilding for code search if enabled. You can try to disable it and restart or just wait that it end. |
Very strange, when I start gitea via docker & systemd like I for the last year it won't surpass starting the ssh server. But if I then enter the container via docker exec and run /app/gitea/gitea the web interface starts working too. Looks like gitea web just keeps crashing
|
@shimunn it doesn't seems to be the same issue to help you on your specific case please start another issue and give us more intel on your problem like:
Please remove any confidential informations from those details before sharing them. The exec context is not the same as the startup one and you may not load the same configuration. |
@sapk is the indexing/code search something that was introduced in 1.9? thanks for the explanations. |
I am not the most expert on the code indexer part but from what I know, it was present at least in 1.8.0 but it needed futher rework later and was limited. For details, a PR exist to be able to not rebuild the index at migration but manually next time #7753 |
ahh. thanks alot! now it's constant 0.3% cpu, that's ok for me. though I wonder where the 0.3% go - my django projects are all on 0.0% when idle? just if you got an idea - I'm more than happy now, everything works, and learnt some behind the scenes...:-) |
I cann't say exactly but gitea can provide pprof cpu and mem profile. You could used that options to find what take cpu times. Thoses options are not well documented #6240 but you can found all the information from #4560. After the profile file are generated you can use standard |
thanks even more! |
@sapk Yes, that's correct. And it will happen again when upgrading to 1.10.0. I think we should include some kind of warning in the upgrade guide? |
Thanks for the explanation, but what is current solution for this? |
I dont exactly know. From what I can tell, rebuilding the index takes a lot of resources. If this leads to the 502 is not at all verified. Sorry, looks like I was taking over your issue... |
Just upgrade Gitea in a slow part of the day; perhaps blocking accesses, and leave it there rebuilding the index (the log should calm down after finishing). It shouldn't take too much time. In our medium sized VM (server at least 8 years old), it took around 5~10 seconds for every 100 MB of repo. Alternatively, you could disable repository indexing while upgrading:
And remove the directory pointed to by |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
[x]
):Description
I tried to upgrade from version 1.8.3 to 1.9.2. I downloaded it(https://dl.gitea.io/gitea/1.9.2/gitea-1.9.2-linux-amd64) and replaced binary in global location:
sudo cp gitea /usr/local/bin/gitea
Gitea is in running status, but got error 502 Bad Gateway nginx/1.14.0 (Ubuntu) when tried to reach it.
The text was updated successfully, but these errors were encountered: