Comments (8)
Sounds like a bug. There is probably something in the setConfiguration()
code path that acquires a lock used by the request processing.
One way to avoid this is to use the per project workflow which avoids uploading the configuration to the webapp.
from opengrok.
@vladak looks like with 1.13.2
this behavior is a little different. The webapp allows the source to be browsed although the search, history and any other functionality which requires some sort of querying doesn't respond until indexing is done.
Is it expected for Sending configuration to: http://localhost:8080/source
to take so long (~5minutes for a ~3.5GB project even when there are no source changes)? It's also confusing since the configuration is only 8KB @ /opengrok/etc/configuration.xml.
My indexing command is:
opengrok-indexer -a /opengrok/dist/lib/opengrok.jar -- -s /opengrok/src -d /opengrok/data -H -P -S -G -W /opengrok/etc/configuration.xml -U "http://localhost:8080/source
I also couldn't get per project setup to work without the same issue either, could you elaborate on how the setup would look?
from opengrok.
The configuration processing in the webapp might be held by invalidating repositories. Could you take a look at the webapp logs while the configuration upload is in progress to see if that is the case ? Ideally also capture the thread stacks at that point using jstack
.
The point of per project workflow is that per project reindex does not send the complete configuration at the end of the reindex:
It merely pokes the webapp to bump the index reader for given project.
from opengrok.
I continuously get the same log across multiple threads almost exactly 1 second apart FINEST [http-nio-8080-exec-<tid>] org.opengrok.web.api.v1.filter.IncomingFilter.filter allow request to status/<same-uuid-with-every-request> based on localhost IP address
.
When searching a query I see FINEST [http-nio-8080-exec-15] org.opengrok.web.api.v1.suggester.parser.SuggesterQueryDataParser.processQuery Processing suggester query: hello at 5
and jstack
suggests this is due to the Suggester.rebuild()
holding a lock and the search uses SuggesterServiceImpl.getSuggestions
and SuggesterServiceImpl.onSearch()
waiting for that lock during indexing.
EDIT: Disabling suggester works fine, sending config finishes in sub second time. Looks like suggester should be temporarily turned off during it's rebuilding to avoid this denial of service.
from opengrok.
It may be, and this is purely a speculation at this point, that at the time the configuration is sent to the webapp, there is already a sequence of suggester rebuild jobs waiting in the queue and it somehow blocks the request. The rebuild()
method holds a R/W lock for writing so this would block any suggester read requests. The just released 1.13.3 improves suggester rebuild request handling so this might provide some relief, however does not solve the problem.
from opengrok.
I see, I can reproduce it 100% of the time, so this waiting for rebuild thread is either triggering all the time or indexing somehow spawns it and takes a very very long time to do so as well.
Probably interesting to look into how we can optimize suggester rebuilds especially when we have history information and we can granularly build it. Or maybe disable the feature entirely when rebuild is on.
EDIT: 1.13.3
has the same issue and reproduces the same way. The performance of the rebuilds seems to be similar wallclock time.
from opengrok.
Could you take the stack trace snapshot using jstack
on the Tomcat process when this issue occurs and there is a pending request to the webapp that is stuck ? There should be a better way to fix this than disabling suggester.
from opengrok.
Related Issues (20)
- Rename master branch to main as per lastest github standards
- help config provides suggester config in every element HOT 3
- displaying annotation leads to NPE HOT 2
- Dockerfile requests a vulnerable version of Apache Tomcat HOT 1
- replace docker build with modern alternative
- No module named 'opengrok_tools' in Docker HOT 5
- Installing opengrok-tools.tar.gz fails from 1.12.24 HOT 2
- configuration.xml gets truncated in 1.12.26 HOT 1
- Support retrieving function definitions for a project path HOT 5
- genre check for hasAnnotation() is not enough HOT 2
- Test Python Package fails HOT 8
- `READONLY_CONFIG_FILE` doesn't work in docker containers HOT 1
- make the "is-annotatable" check more precise
- OpenGrok Indexer. FileNotFoundException while indexing directories HOT 8
- Fix typo in CONTRIBUTING.md file HOT 1
- cannot remove suggester data for extended period of time due to pending rebuilds
- binary data in logs again due to annotation processing HOT 1
- indexer might degrade to serial processing for the trailing project HOT 1
- limit addFile() processing time HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opengrok.