Fixed Post with 5,200+ likes trigger Out of Memory Error

rdn

Well-known member
I have this thread/post with 5,200+ likes:
upload_2014-8-11_0-1-54.webp

But when someone try to like it or open the overlay link "5,243" it will trigger an Out of Memory error.
Using Memory limit of 128MB on PHP.
Now I changed my limit to 256mb and the issue is gone.

Is this problem normal for 128MB memory limit?
Or is related to some addon :/
What if that post gains 10,000 likes? another increase in memory again?

Can someone point me a post here in XF Community with 5K like?
I want to try it here.
 
Each post has to load a list of username + userid for every like against that post before it can be rendered. This is stored as a string serialized via the built-in php serialize function.

What version of php are you using? ~5000 array entries shouldn't be that bad, so I'm not sure what is making what should be 10-20mb consume +100mb. Probably lots of temp copies, and that the php serialize format is quite verbose.
 
Why can't address this problem I've encounter?
There's every possibility this is the first time we've seen this reported, hence we've not had the opportunity to address it, yet :)

I've moved this into the bug reports forum as we may need to look at some way of constraining the amount of data loaded at once.
 
There's every possibility this is the first time we've seen this reported, hence we've not had the opportunity to address it, yet :)

I've moved this into the bug reports forum as we may need to look at some way of constraining the amount of data loaded at once.
I can give test account for you to try if you want Chris.
 
And also, Can you give me a SQL query to sort/list threads with top likes received?
Maybe I have threads more than that 10K list.
 
I can give test account for you to try if you want Chris.
We'll let you know if we need it. The reproduction case seems somewhat clear.

And also, Can you give me a SQL query to sort/list threads with top likes received?
Maybe I have threads more than that 10K list.

Just order the xf_post table by likes, that will tell you the posts with the most number of likes and from that you can infer the thread ID.
 
Back
Top Bottom