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

XFMG 1.0.2 causing PHP OOM errors when viewing user profiles (random)

imthebest

Well-known member
#1
Since I upgraded from XFMG 1.0.0 to 1.0.2 I'm starting to see my php.log file filled with these records:

Code:
[13-Jan-2015 19:38:07 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 78 bytes) in /var/www/html/library/Zend/Db/Statement/Mysqli.php on line 304
[13-Jan-2015 19:38:23 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 78 bytes) in /var/www/html/library/Zend/Db/Statement/Mysqli.php on line 304
[13-Jan-2015 19:38:37 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 80 bytes) in /var/www/html/library/Zend/Db/Statement/Mysqli.php on line 304
[13-Jan-2015 19:39:07 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 78 bytes) in /var/www/html/library/Zend/Db/Statement/Mysqli.php on line 304
[13-Jan-2015 19:39:42 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 78 bytes) in /var/www/html/library/Zend/Db/Statement/Mysqli.php on line 304
[13-Jan-2015 19:40:13 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 1699 bytes) in /var/www/html/library/Zend/Db/Statement/Mysqli.php on line 294
This happens when trying to view the profile of a member (random).

I disabled XFMG 1.0.2 and the problem went away. I have re-enabled it and seems like the problem is gone because now I can see his profile. Maybe the problem will happen again later, I'll keep an eye on my php.log file.

Btw I enabled debug mode and I'm trying to see what queries XFMG runs when viewing a user profile however I can't see a single query related to XFMG on URLs like: https://xenforo.com/community/members/super120.62179/?_debug=1

So is XFMG query-less? I don't think so...
 

Chris D

XenForo developer
Staff member
#2
Details ...

How many media items does the person have. How many albums does the person have?

Going to a user's profile page doesn't load any Gallery stuff unless you click on the Media or Albums tab on their profile. That's why there's no queries listed there.

Is it just loading the profile that causes the problem? Or does the media tab have to be clicked first?

If you want to see the queries at play then clicking the media tab will load a URL like:

https://xenforo.com/community/media/users/super120.62179/
 

imthebest

Well-known member
#3
6 media items on 2 albums. Just loading the profile causes the problem, no need to click on the Media tab.

It's very rare, I disabled XFMG 1.0.2 and the problem went away. Now that I have re-enabled it the problem isn't appearing anymore... I'll keep an eye.
 

Chris D

XenForo developer
Staff member
#4
Then it's definitely not XFMG related.

No media content loads on the profile until the Media tab is specifically clicked.
 

imthebest

Well-known member
#5
But on the profile there is a block that says "Media: X, Albums: Y", isn't that XFMG related?

Btw how do you explain that immediately after disabling XFMG the problem went away? However after re-enabling it the problem hasn't come back (yet) so this is rare...
 

Chris D

XenForo developer
Staff member
#6
How do you explain that immediately after enabling XFMG, the problem didn't come back?

But on the profile there is a block that says "Media: X, Albums: Y", isn't that XFMG related?
Indeed. But that only loads cached data that is already part of the xf_user record (hence why it doesn't show up separately in a query when you look at the debug output).

It's cached, so it certainly wouldn't suck up 256MB memory.