Notifications
Clear all

[Solved] More bugs to fix?

15 Posts
4 Users
5 Reactions
800 Views
Posts: 1163
Topic starter
(@percysgrowroom)
Noble Member
Joined: 5 years ago

Im getting more php errors from wpforo:

 PHP Fatal error: Out of memory (allocated 4490006528) (tried to allocate 536870920 bytes) in /home/percysgr/public_html/wp-content/plugins/wpforo/classes/Forums.php on line 1157

Is this in the right forum? Should I take it to gvectors? Maybe just go straight to the wordpress community? Im not sure, so many different places to post nowadays, please let me know if I am in the wrong place.

14 Replies
dimalifragis
Posts: 2615
(@dimalifragis)
Famed Member
Joined: 4 years ago

@percysgrowroom  This not a bug. I do remember you had the very same issue a few months back. Am i correct?

But i had suggested a few things, you totally ignored. So here it come again:

1. Why only 512 mb allowed? What is your limit in Wordpress and .htaccess?

2. Out of memory could mean a attack from many many simultaneous connections.

3. Is that happening once in a while or daily?

2 Replies
(@percysgrowroom)
Joined: 5 years ago

Noble Member
Posts: 1163

@dimalifragis I think my memory limit is 8096m

Posted by: @dimalifragis

Out of memory could mean a attack from many many simultaneous connections.

I have no idea what it could be. But this happened before and it was down to some code repeating or something. I cant remember the details.

Posted by: @dimalifragis

Is that happening once in a while or daily?

I have noticed 2, one today (7th) and one 6th, but none before then. Most of them are mycred issues 

dimalifragis
(@dimalifragis)
Joined: 4 years ago

Famed Member
Posts: 2615

@percysgrowroom Your memory PHP is 512mb from what i guess from the error. Not 8gb as you say. BUT 512mb should be enough.

If you are under attack or what is happening is clearly shown with some work from you, in your RAW webserver logs. You see the time of the error and you search what is happening in the logs around that time.

So the errors started 2-3 days ago? How did you find out? Do you run debug enabled all the time? What your hosting say about the issue?

Posts: 1163
Topic starter
(@percysgrowroom)
Noble Member
Joined: 5 years ago

Posted by: @dimalifragis

But i had suggested a few things, you totally ignored.

lol, sorry mate, sometimes things just look way too complex, I go do some research on what needs to be done and something else comes up and things get overlooked. I appreciate your help man, I am sorry if you feel like I have wasted your time.

I have things ot do right now but ill try get this info to you in a few hours. Thanks for your help man

1 Reply
Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10548

@percysgrowroom,

Also, please export wp_wpforo_forums table, zip it and attach it here if possible. There could be data issue as well. So the child forum cannot find the parent forum, and it loops the recursive function unlimitedly, filling the memory. This kind of issues arises when you do some database manipulation, or the database table become unhealthy.

Posts: 1163
Topic starter
(@percysgrowroom)
Noble Member
Joined: 5 years ago

Posted by: @robert

There could be data issue as well. So the child forum cannot find the parent forum, and it loops the recursive function unlimitedly, filling the memory.

This sounds very much like it could be the cause of some of the issues. Ill run a back up and send the files over when it is done. Thanks for your help 

Posts: 1163
Topic starter
(@percysgrowroom)
Noble Member
Joined: 5 years ago

now zipped:

7 Replies
Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10548

@percysgrowroom,

Here is the first issue I found. The forum with 172 ID has the same parent ID 172. So it loops through parent-child unlimitedly:

 

You should change the parentid of the forumid 172 to something else, if it's a parent category, the parentid should be 0. If it's a child of a parent category then the parentid should be the forumid of the parent category.

 

Once you changed it in the database, go to wpForo > Overview admin page, click the follwoing buttons:

  1. [Delete all caches]
  2. [Update Forum Statistics]
  3. [Delete all caches] again
  4. Go to wpForo > Forums admin page, make sure the forum with 172 ID is in the correct place and click [Save Forums Order] button

And check the wpforo_forums table again, make sure the parentid of the 172 forum is correct.

(@percysgrowroom)
Joined: 5 years ago

Noble Member
Posts: 1163

@robert Thanks for the input mate. Do you have any suggestions to what I change the forum ID to?

The Parent forum for Growing in Soil is Grow Guides, and the parent of grow guides is cannabis growers forum.....

Do I just change the number of the parent forum in this box, so it is the same as "grow guides">

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10548

Hi @percysgrowroom,

If the parent of Growing in Soil is Grow Guides, you should change the parentid of the Growing in Soil forum to 3, because the forumid of Grow Guides is 3. So just change the parentid from 172 to 3, do not change the forumid, you should only change the parentid.

(@percysgrowroom)
Joined: 5 years ago

Noble Member
Posts: 1163

@robert I have done that now. I think it may be fixed.... after I changed the numbers it showed me i had 2 sections about growing in soil.... I am not sure if it was there before hand or if it was made after.

But most likely i overlooked it. I have deleted the duplicate section and all that now so hopefully this could be the end to the problem. 

I will let you know if i get the out of memory warning again over the next few days or not. Thanks for your help lads 

(@percysgrowroom)
Joined: 5 years ago

Noble Member
Posts: 1163

This is the newest one... lol 

  • [10-Jan-2024 13:19:18 UTC] PHP Warning: Trying to access array offset on value of type null in /home/percysgr/public_html/wp-content/plugins/wpforo/modules/reactions/classes/Template.php on line 82
  • [10-Jan-2024 13:19:18 UTC] PHP Warning: Undefined array key 1 in /home/percysgr/public_html/wp-content/plugins/wpforo/modules/reactions/classes/Template.php on line 82

This is what is online 82:

	wpforo_member_link( WPF()->member->get_member( $l_usernames[1]['userid'] ), '', 30, '', false, $l_usernames[1]['dname'] )
Moderator
(@martin)
Joined: 8 years ago

Support Team
Posts: 988

Hi @percysgrowroom,

Ok, thank you for letting us know. We'll add some changes to prevent such errors. This is not a core issue, but this can be prevented as well.

(@percysgrowroom)
Joined: 5 years ago

Noble Member
Posts: 1163

@martin Everything seems to be working smooth now mate. No more php warnings expect for the same old one from My Cred, and they dont seem eager to get it fixed. 

Thanks for your help everyone 🙂Â