• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

RoldanLT

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

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.
 

Xon

Well-known member
#3
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.
 

RoldanLT

Well-known member
#5

Chris D

XenForo developer
Staff member
#6
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.
 

RoldanLT

Well-known member
#7
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.
 

RoldanLT

Well-known member
#8
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.
 

Chris D

XenForo developer
Staff member
#9
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.