Hi,
I’m getting these warnings in the server logs. More output:
{{#get}} helper took 257ms to complete
Error ID:
0dd87240-682c-11ea-b674-c5d6208d84c1
Error Code:
SLOW_GET_HELPER
Details:
api: v3.[object Object].browse
apiOptions:
filter: featured:true+tag:leben
limit: 5
returnedRows: 5
Can anyone point me in the right direction to fix those?
Looks like you might be misusing the {{#get}}
helper. Have you seen our documentation on it? Might help you to debug your issue:
1 Like
Thanks, @DavidDarnes. I took a look at the docs. I found this remark:
Please note : This is a powerful tool, that has the potential to be overused and cause problems on a site.
Specifically, I’m using this request in a dev environment:
{{#get "posts" limit="4" include="authors" filter="featured:true+tag:leben"}}
You think this is already too much?
I don’t think so, it could be the lack of ram you’re giving the site. Would explain the SLOW_GET_HELPER
error code
1 Like
So, I tried it on a server now, but the problem persists. It’s a 2 GB ram server.
I’m - or actually the template I bought and adapted from the Ghost marketplace is - using 7 of these get helpers on the frontpage. Maybe the 7 separate calls cause the problem?
Oh, that is a lot. That would explain the performance issues. Could you share what you’re trying to do with those #get
helpers? Maybe there’s an easier way
Sure. Thanks for your help.
Well, I’m adapting the World-Times theme from your marketplace (World Times - Newspaper & Magazine Style Ghost Blog Theme by GBJsolution) and on the front page it uses the get helpers to get 4-7 posts from various categories/tags.
Ah I see. So does this theme already have 7 #get
helpers on the home page? Or are you adding to it? You might be able to use a different method fill the home page without using as many
Yeah, it does. I think even one more. Only thing I added is the featured:true filter. How would you suggest to change it? Loading a bunch of posts and sorting it clientside? But then you can’t make sure to have every category/tag filled.
I think there could be performance improvements in this theme. I see that @GBJsolution is the developer of this theme, can you provide more information on how this theme is meant to be used and if there can be performance improvements?
1 Like
@GBJsolution Do you have any input on this issue with your theme?
On the home page of this theme, there are multiple get helper query for each section. Because each section shows latest posts in pre specified tag. If you need this functionality then there is no better way. In my opinion currently it’s not so bad performence for the feature. But if you worried about it and want to reduce number of {{get}} helper call, you can always remove few tag section from home page and show less number of tag section (posts by tag).