Daniel-KM / Omeka-S-module-AdvancedSearch

Module for Omeka S that improves search with new fields, auto-suggest, filters, facets, specific pages, etc.
Other
3 stars 2 forks source link

Memory issue #8

Closed jsedgwickcpl closed 2 weeks ago

jsedgwickcpl commented 12 months ago

I'm running an Omeka-S site (version 4.0.3, using the Default theme) with a page that uses the Advanced Search Module form/content block. I've been adding large sets of items to the site using csv import, and suddenly encountered an issue today after I imported my latest batch (bringing the number of items up to 300,888). Only the page that includes the Advanced Search form is presenting an issue (the header, navigation, and advanced search fields are suddenly all gone). When I deactivate the Advanced Search module, the page loads correctly (though of course without the search form). Prior to the latest batch import, the site, including Advanced Search form, was functioning fine (with around 250k items loaded).

My error log includes this line: PHP Fatal error: Allowed memory size of 205520896 bytes exhausted (tried to allocate 16777224 bytes) in /home/chattlib/collections.chattlibrary.org/modules/AdvancedSearch/src/Response.php on line 230

Here's the page where the Advanced Search form is: https://collections.chattlibrary.org/s/obits

Here’s an example item record, which loads fine: https://collections.chattlibrary.org/s/obits/item/456579

I've tried deleting the Advanced Search page configuration I'm using here and re-creating it, but the same issue returns. I've tried adding the Advanced Search page under Navigation, rather than creating a Page and adding the search form as a content block on that page, but I get an error message with that approach as well.

I'm running a second Omeka-S site in this same installation that also uses Advanced Search and it's functioning fine: https://collections.chattlibrary.org/s/localhistory/find

Please let me know if you need any further info to help troubleshoot this issue. Thank you!

jsedgwickcpl commented 11 months ago

Update - since this page was part of a live and active site, I moved it out of my site navigation and changed its url. The link to the page with the Advanced Search form that is experiencing issues is now: https://collections.chattlibrary.org/s/obits/page/advancedsearch

Daniel-KM commented 9 months ago

I update the module with many various improvements (version 3.4.15). Is it fixed?

jsedgwickcpl commented 9 months ago

First I'll note that the hosting service we use (Reclaim) was previously able to increase the memory limit enough to allow the page using the Advanced Search page to load, albeit very slowly (averaging 20-30 seconds to run a search, apply a filter, etc).

Today I updated our Advanced Search module to 3.4.15, and updated the Reference module to the latest version as well. Unfortunately now the Advanced Search form/page won't run a search at all. As in, you enter a search term, hit "search", and nothing happens - no gears turning, no message saying "no results", etc. This page should also by default display results below the search form before you even enter a search, and no results are showing up. http://collections.chattlibrary.org/s/obits

Similar to before, I have another site in my Omeka-S installation with far fewer items in its resource pool (less than 11k); it's now running the same updated Advanced Search module and it appears to be functioning fine: https://collections.chattlibrary.org/s/localhistory/find

Please let me know if you need any further info/screenshots to help with looking into this.

jsedgwickcpl commented 9 months ago

A further update: The most notable difference I could identify between the Advanced search form on our Local History site (which works) vs the form on our Obituary Index site (which doesn't work as of 3.4.15) is that the latter is generated using a page block, while the former is generated by adding it using Site Navigation (so it's not its own editable page).

I tested whether the use of the page block is the source of the problem by adding another Advanced Search form to my Obituary Index site using Navigation, and it works (so this seems to confirm that the page block function is the issue). However, the page/form still runs VERY slowly (about 30 seconds to load the page and to return search results). And I'd prefer to make the form available using a page block, rather than adding via Navigation, because I also need this page to contain html.

I then updated my Blocks Plus module to the latest version to see if it would fix it, but the issue persists.

For now, given that the updated module doesn't seem to help with the performance issues we're experiencing, and has introduced the new issue with the page block, I'm going to revert back to the version we were using previously (3.4.6.20). I'd love to try again if you're able to work out the page block issue. Thank you!

Daniel-KM commented 9 months ago

Yes, i fixed many issues on the main search form, but not checked the block page, but they are close. One of the issue i fixed was related to the filters and another one to the facets. Can you try without them? Or if you have more logs. Else, i will fetch your data on a test server, but there are numerous, so it will take some time.

Daniel-KM commented 2 weeks ago

Fixed in version 3.4.31.