Skip to content
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

Improve publication fetching routine #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MatthiasZepper
Copy link
Member

@MatthiasZepper MatthiasZepper commented Jan 13, 2025

It seems that fetching a new set of publications to display on our website unfortunately fails at times because of the large memory requirements of that operation:

[02-Jan-2025 08:14:09 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/[ngisweden-dev.scilifelab.se/wp-content/themes/ngisweden/functions/shortcodes/ngisweden_publications.php](http://ngisweden-dev.scilifelab.se/wp-content/themes/ngisweden/functions/shortcodes/ngisweden_publications.php) on line 44

I have now tried to improve the JSON decoding step and doubled the amount of memory in the wp-config.php from 256MB to 512MB.

However, regardless of the change, the fetching gives a Gateway timeout for the first time and then also subsequently doesn't load the website for a while. But after a minute or so, everything works as expected again and fresh new shiny publications are there. I think that we need to look into options to execute the publication fetching asynchronously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant