The first analysis of a project is generally longer than subsequent analyses. However, you may still experience an analysis taking a day or longer.
It can sometimes happen on repositories where third-party libraries or other generated code is checked into Git. If you think this is the case, you can exclude those files by going to the "Exclusions" tab in the project configuration and adding the appropriate glob patterns. Then you can stop an ongoing analysis and start a new one
Check out our file exclusions documentation.
If the solution above didn't help, please attach logs when raising a ticket with support. More information and instructions on generating logs can be found in our troubleshooting documentation.