-
Notifications
You must be signed in to change notification settings - Fork 9
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
[OJS 3.2.1.4] Problem plugin Lucene Solr #14
Comments
Hi @diegomejia071 , this is indeed very unusual behaviour. On our servers the lucene plugin is running well with OJS 3.1.2-4. The error messages and warnings you show point to a severe disruption of the system. In particular the warning "PHP Warning: Use of undefined constant STATUS_PUBLISHED - assumed 'STATUS_PUBLISHED' (this will throw an Error in a future version of PHP) in /plugins/generic/lucene/classes/SolrWebService.inc.php on line 178" puzzles me since the constant is defined in "lib/pkp/classes/submission/Submission.inc.php" which is not part of the lucence plugin. I don't have a clue at the moment what might be the problem. How did you install the plugin? Did you clone it to your server or did you download a release package? For OJS 3.1.2 we don't have a release package and you currently have to use the master branch. Please verify the release version and date in your version.xml file in the lucene folder are:
If these are Ok you should have a closer look at the PHP error log. Look for any references to "lucene" that could help to pinpoint the problem. Regards, |
Hi @ronste, I'm sorry I made the wrong version, the version we are using is 3.2.1.4. Install the plugin, from the OJS Plugin Gallery. Activate the plugin and configure it according to the following documentation. The version of Solr I use is 8.10.1. Plugin version is:
|
Hi @diegomejia071 , I just installed the Lucene/Solr plugin on my OJS 3.2.1-4 test server from the plugin gallery (I didn't start the Solr server). I could open the settings dialogue without any problems. My suspicion is that there might be another problem with your installation. The warning about STATUS_PUBLISHED and the DB error message point in that direction. Please try the following:
I hope with this procedure we can pinpoint the problem somehow. Best wishes, |
Hi @ronste,
And it shows me the following in the error log. He dialog opens, but it takes too long. Also if I try to load the journal, it stays loading. And it shows me the following in the php error log.
|
Hi @diegomejia071 , that's a good starting point: "PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 380928 bytes) in /plugins/generic/lucene/LucenePlugin.inc.php on line 865, referer: https://revistas.udea.edu.co ". This means the Lucene/Solr-Plugin tries to allocate a rather small amount (380928 bytes) of memory but there is no more memory available, the size of 1073741824 is already exceeded. This also slows down the opening of the dialogue and the display of the frontend. You should try to figure out at what point the memory limit is exceeded. I would suggest to repeat the above procedure and watch the memory consumption of the processes on your server. You mentioned above that already without the Solr sever started the system becomes very slow. So my suspicion is that the process consuming a large amount of memory is already running. It is probably not the Solr server itself. Best wishes, |
Hi @ronste, But look, as I told you in the previous post, I just activated the plugin, but without starting the server, I already have these problems. Enable the plugin again, without starting the server. The dialog opens, but it takes too long and it shows me the following in the php error log.
Also if I try to load the journal, it stays loading and not open: And it shows me the following in the error log.
And all this happens only by activating the plugin, but if I deactivate it, the platform, the journals and the other plugins work correctly. |
Hi @diegomejia071 , unfortunately I am not able to reproduce the problem on my test server. I can open or close the dialogue and/or frontend page without any problems and independent on any settings I enable. So I can only guess what my be happening on your system. We can try another approach:
As I said before I am not able to reproduce the issue on my server. I am also not the developer of the plugin. I just did some minor maintenance. Currently I don't have any idea what the problem might be. Maybe others might be able to help: @withanage , @asmecher |
Hi @ronste, The journal does not load me as soon as I enable the plugin.
An error has occurred while someone was trying to search for the installation. |
Hi @diegomejia071 , ok, we are getting closer to the issue. But I still don't see where this big chunk of memory is allocated. The next step I would try on my server is to debug the code line by line. Don't know if you can do this on your server. Otherwise I am not able to help much any more. That's why I mentioned my colleagues above. I would suggest you post this issue again at https://github.com/pkp/pkp-lib/issues. There are more people who could potentially help with this issue. Mention the OJS and plugin version numbers and include a link to our discussion here. |
Hi @ronste, When I want to re-index the search with php rebuildSearchIndex.php -d
I don't know if the MySQL execution time could be, or the memory, the truth is I don't know where I could check. Where do you want me to review or debug the code line by line? Also because when it rebuilds the search index, there are journals to which it does not index anything. For example:
|
Could you monitor the memory consumption on the server while you are trying to rebuild the index? Does it loose connection to MySQL due to lack of memory? This would be interesting because we still don't know whether the memory issue is caused by backend code or while generating templates for the browser. |
Depending on your system there are different options. You could use an IDE suitable for PHP with XDebug (has to be installed on the server) to do step by step debugging. If you don't have this possibility you could add debug statements to the code that write to the error log. Something like this would be suitable (I didn't test this code):
You should start with the Line 102 in 31b7cba
Put a debug statement at the beginning and the end of the function an look for the memory allocated. If it is still ok at the end of the function go ahead with the |
Hi @ronste, Yesterday's day, I managed to rebuild the search index for all my journals. The plugin seems to be working fine now. With the memory thing, I have to check as you mentioned and debug the code, I also have to check if I can allocate more memory to my server, because our installation is too big and we have many journals on our platform. I only have one doubt, because when the search index is rebuilt, there are some that are not indexed at all, that is, 0 articles or very few. As in this case, that I mentioned you in the previous post.
|
Hi @ronste, And something very strange happened, at 11:27 since Solr was disconnected from the server, but at that time there was no strange event for this to happen. What could it be?
Today he came back and the service of the sun woke up. I don't know what could be happening, or why this service is down.
|
Hi @diegomejia071 , there could be different reasons for that. Without knowledge of your system and journals I can't really say anything. |
Hi @diegomejia071 , again I can't really say much. But the error message clearly says "connection refused" and not "service not available". Clearly some service answered to the request but the connection was not allowed. So its not about a service being down. Best wishes, |
Hi @ronste, I understand what it says in the message, what happens is that when this happens, the service no longer reconnects, and when I search one of my magazines, it appears blank. To get it to work again, I have to go and start Solr again. In the image you can see that the service is already showing this message: |
Hi @diegomejia071 , did you look at your apache access log? Is the request logged there or is it rejected before? If it is logged, any hints why the connection is refused? |
Hi @ronste, I have another problem. After configuring the Lucene plugin in my OJS 3.2.1.4, which works perfectly when performing searches. I see that I receive different emails from some journals, with errors in the searches; which I don’t know why they happen.
|
Hi @diegomejia071 , this message is sent whenever the lucene plugin was not able to talk to the solr server. There could be a number of reasons, including performance issues on the server, for this to happen. In most cases this is a temporary issue. In case it persists you should monitor your server load and/or connections. By the way, this plugin is now maintained by PKP and moved to https://github.com/pkp/lucene |
Hi,
I did the installation of the Lucene/Solr plugin with Embedded Server Mode: Installation and Configuration, but when I enter and try the search endpoint http://xxxxxxxxx:8983/solr/ojs/search, it gives me the following error in the browser:
Also, when trying to configure the plugin from the plugins section of the OJS platform, it does not open and stays loading:
When rebuilding the index php tools/rebuildSearchIndex.php -d shows me the following error:
LucenePlugin: Reset index…done LucenePlugin: Indexing “Philology. Academic and cultural newsletter”
PHP Warning: Use of undefined constant STATUS_PUBLISHED - assumed 'STATUS_PUBLISHED' (this will throw an Error in a future version of PHP) in /plugins/generic/lucene/classes/SolrWebService.inc.php on line 178
And at the end the indexing crashes and shows the following error:
PHP Fatal error: Uncaught Exception: DB Error: MySQL server has gone away Query: UPDATE submission_settings SET setting_value = ? WHERE setting_name = ? AND submission_id = ? in /lib/pkp/classes/db/DAO.inc.php:703 Stack trace: #0 /lib/pkp/classes/db/DAO.inc.php(231): DAO->handleError(Object(ADODB_mysqli), 'UPDATE submissi...') #1 /plugins/generic/lucene/classes/SolrWebService.inc.php(292): DAO->update('UPDATE submissi...', Array) #2 /plugins/generic/lucene/classes/SolrWebService.inc.php(213): SolrWebService->_indexingTransaction(Array, 200, 157) #3 /plugins/generic/lucene/LucenePlugin.inc.php(1178): SolrWebService->pushChangedArticles(200, 157) #4 /plugins/generic/lucene/LucenePlugin.inc.php(706): LucenePlugin->_rebuildIndex(true, Object(Journal), true, true, 'LucenePlugin: R...') #5 /var/www/htm in /lib/pkp/classes/db/DAO.inc.php on line 703 PHP Fatal error: Uncaught Exception: DB Error: MySQL server has gone away Query: UPDATE sessions SET user_id = ?, ip_address = ?, user_agent = ?, created = ?, last_used = ?, remember = ?, data = ?, domain = ? WHERE session_id = ? in /lib/pkp/classes/db/DAO.inc.php:703 Stack trace: #0 /lib/pkp/classes/db/DAO.inc.php(231): DAO->handleError(Object(ADODB_mysqli), 'UPDATE sessions...') #1 /lib/pkp/classes/session/SessionDAO.inc.php(109): DAO->update('UPDATE sessions...', Array) #2 /lib/pkp/classes/session/SessionManager.inc.php(185): SessionDAO->updateObject(Object(Session)) #3 [internal function]: SessionManager->write('5oc1ldi6o93m7uf...', '') #4 [internal function]: session_write_close() #5 {main} thrown in /lib/pkp/classes/db/DAO.inc.php on line 703
And when this plugin is active, the journals are not displayed, they take a long time to load:
The text was updated successfully, but these errors were encountered: