Open mohit-naroliya opened 1 week ago
Thank you for submitting your first issue, awesome! 🚀 We're thrilled to receive your input. If you haven't completed the template yet, please take a moment to do so. This ensures that we fully understand your feature request or bug report. A core team member will review your issue and get back to you.
If you like Orchard Core, please star our repo and join our community channels.
How is the Lucene query issue related to the SQL connections pool limits? Can you share more of the stack-trace where the lucene issue is coming from? I want to understand what is sending user input as a lucene query. Because what is happening is that the code is expecting a lucene query, but the user doesn't provide that. There is a mismatch that needs to be resolved. If it's your code then don't expect a query from the user, build a query from the text that is provided. IF it's OC's code we need to fix it, but we need to know what is calling it.
The example you showed for the connection is actually closing it as it's using a using
statement that will dispose and close the connection however it exits the method. It doesn't mean there is no such issue, but not in the code you pointed to.
Describe the bug
We encountered a strange issue on the production site that caused it to go down. After investigating, we found few exceptions in the log related to Lucene. Here are the logged exceptions:
Following the initial exception, we started receiving numerous connection failed exceptions, which ultimately caused the site to go down. Here is the log and the relevant exceptions:
I went through the OC branch code base and found that there is a method opening a SQL Server connection without properly closing it. This could be the reason we are reaching the maximum connection pool size, leading to the site going down.
Above image method calling from the IndexingBackgroundTask that runs every minute.
Orchard Core version - 1.8.3