1. 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

Discussion in 'Resolved Bug Reports' started by RoldanLT, Aug 10, 2014.

  1. RoldanLT

    RoldanLT Well-Known Member

    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.
     
  2. RoldanLT

    RoldanLT Well-Known Member

    Any big board forum owners can test this if you have thread/post with 5K+ likes?
     
  3. Xon

    Xon Well-Known Member

    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.
     
  4. RoldanLT

    RoldanLT Well-Known Member

    I'm using PHP 5.5.15 with ZendOpcache.
     
  5. RoldanLT

    RoldanLT Well-Known Member

  6. Chris D

    Chris D XenForo Developer Staff Member

    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 likes this.
  7. RoldanLT

    RoldanLT Well-Known Member

    I can give test account for you to try if you want Chris.
     
  8. RoldanLT

    RoldanLT Well-Known Member

    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.
     
  9. Chris D

    Chris D XenForo Developer Staff Member

    We'll let you know if we need it. The reproduction case seems somewhat clear.

    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.
     
    RoldanLT likes this.
  10. RoldanLT

    RoldanLT Well-Known Member

    Ok, here's my top threads/post:
    upload_2015-6-26_23-46-35.png
     
  11. Mike

    Mike XenForo Developer Staff Member

    We have now applied pagination to like pages in 1.5.
     
    Eagle, JulianD, Liam W and 11 others like this.
  12. RoldanLT

    RoldanLT Well-Known Member

    Thanks XF Team.
     
  13. RoldanLT

    RoldanLT Well-Known Member

    Yeah, I have upgraded my Live Forum, and it works fine now :).
     

Share This Page