Fixed XF 2.3 Upgrade Bug

Maa

Active member
Affected version
2.3
Hi,

I upgraded to 2.3 and resolved most issues that were related to addons however this one continues to show:

  • ErrorException: Fatal Error: Allowed memory size of 5368709120 bytes exhausted (tried to allocate 83886080 bytes)
  • src/XF/Mvc/Entity/Finder.php:1505

Thanks.
 
Where does this error come up? If it's just in the logs, please include the request state (you can redact the domain as necessary). If this is related to rebuilding the search index, it has already been fixed for 2.3.1.
 
Hi,

Please find below:

Code:
Stack trace
#0 [internal function]: XF::handleFatalError()
#1 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(112) "https://www"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

To make you aware, I had the similar issue for rebuilding the search index, but replaced it with a file mentioned in one of the threads. That resolved the rebuilding of the search index.

File used for resolving errors related to search index: https://xenforo.com/community/threa...ince-xenforo-2-3-0-final.222908/#post-1691532

However, this error is new.
 
Last edited:
Hi,

Please find below:

Code:
Stack trace
#0 [internal function]: XF::handleFatalError()
#1 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(112) "https://www"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

To make you aware, I had the similar issue for rebuilding the search index, but replaced it with a file mentioned in one of the threads. That resolved the rebuilding of the search index.

File used for resolving errors related to search index: https://xenforo.com/community/threa...ince-xenforo-2-3-0-final.222908/#post-1691532

However, this error is new.

This is the same for me. I had the original issue of not being able to rebuild the search index, installed the updated file which solved the issue with the search rebuilt, but still get an exception error which I posted this morning in a seperate bug report.
 
Is the error persistent? If so, the contents of the xf_job table would be helpful for tracking this down.
 
I have a couple of questions regarding the forum’s setup and performance. Could you provide details about the environment in which the Xenforo forum is running? Specifically:

1. Are you using shared hosting, a VPS, or a dedicated server?
2. What are the specifications of the server, particularly the RAM and CPU details?

I suspect there might be a memory leak or insufficient memory on the hosting server, but this is just a hypothesis. Understanding the server’s configuration could help diagnose and address any potential issues.

Thanks in advance!
 
Is the error persistent? If so, the contents of the xf_job table would be helpful for tracking this down.
Hi,

The error is different now:
Fatal Error: Allowed memory size of 5368709120 bytes exhausted (tried to allocate 20480 bytes) Today at 8:20 AM src/XF/Db/Mysqli/Statement.php:134

This error occurs normally everyday going off the logs.

Could you explain how to export the xf_job contents please?

@jman thanks for your reply but it is not related to insufficient memory on the hosting server as these issues only occurred after upgrading.

Thank you.
 
Fatal Error: Allowed memory size of 5368709120 bytes exhausted (tried to allocate 20480 bytes) Today at 8:20 AM src/XF/Db/Mysqli/Statement.php:134
Does the request state still show this is for job.php?

Could you explain how to export the xf_job contents please?
You may run the query:
SQL:
SELECT job_id, unique_key, execute_class, manual_execute, trigger_date, last_run_date, attempts, priority
FROM xf_job

You may also open a ticket with XF and host/server credentials and I can take a closer look.
 
Does the request state still show this is for job.php?

It does for me. I still get these randomly all day long...




  • ErrorException: Fatal Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes)
  • src/XF/Mvc/Entity/Entity.php:1858
  • Generated by: Unknown account
  • July 24, 2024 at 3:44 PM

Stack trace​



#0 [internal function]: XF::handleFatalError()
#1 {main}


Request state​


array(4) {
["url"] => string(15) "/forums/job.php"
["referrer"] => string(89) "https://www.explorerforum.com/forums/forums/2007-2010-explorer-sport-trac.124/post-thread"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

Delete
 
The same information requested above may be useful:

You may run the query:
SQL:
SELECT job_id, unique_key, execute_class, manual_execute, trigger_date, last_run_date, attempts, priority 
FROM xf_job

You may also open a ticket with XF and host/server credentials and I can take a closer look.
 
Does the request state still show this is for job.php?


You may run the query:
SQL:
SELECT job_id, unique_key, execute_class, manual_execute, trigger_date, last_run_date, attempts, priority
FROM xf_job

You may also open a ticket with XF and host/server credentials and I can take a closer look.
Please see:
1721933577420.webp
 
The same information requested above may be useful:


Code:
 SELECT job_id, unique_key, execute_class, manual_execute, trigger_date, last_run_date, attempts, priority
-> FROM xf_job;
+---------+----------------------------------+----------------------+----------------+--------------+---------------+----------+----------+
| job_id | unique_key | execute_class | manual_execute | trigger_date | last_run_date | attempts | priority |
+---------+----------------------------------+----------------------+----------------+--------------+---------------+----------+----------+
| 2 | cron | XF\Job\Cron | 0 | 1721961749 | 1721961660 | 0 | 100 |
| 9 | xfUpgradeCheck | XF\Job\UpgradeCheck | 0 | 1721981085 | 1721871676 | 0 | 100 |
| 10 | xfCollectStats | XF\Job\CollectStats | 0 | 1722598015 | 1721581180 | 0 | 100 |
| 1127730 | upgradeConversationSearchRebuild | XF\Job\SearchRebuild | 0 | 1721962272 | 1721961372 | 0 | 100 |
+---------+----------------------------------+----------------------+----------------+--------------+---------------+----------+----------+
4 rows in set (0.000 sec)
 
Please let me know if replacing src/XF/Job/AbstractJob.php with the attached file helps.


  • ErrorException: Fatal Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes)
  • src/XF/Mvc/Entity/Entity.php:1858

  • Generated by: Unknown account
  • July 27, 2024 at 2:45 PM


Stack trace​



#0 [internal function]: XF::handleFatalError()
#1 {main}


Request state​



array(4) {
["url"] => string(15) "/forums/job.php"
["referrer"] => string(92) "https://www.explorerforum.com/forums/threads/1997-mountaineer-speedometer-correction.368367/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
----------------------------
----------------------------------



  • ErrorException: Fatal Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes)
  • src/XF/Mvc/Entity/Entity.php:1858

  • Generated by: Unknown account
  • July 27, 2024 at 1:30 PM


Stack trace​



#0 [internal function]: XF::handleFatalError()
#1 {main}


Request state​



array(4) {
["url"] => string(15) "/forums/job.php"
["referrer"] => string(94) "https://www.explorerforum.com/forums/threads/cargo-area-measurements-seats-folded-down.481523/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
I think the issue may be that the queued search rebuild attempted to run prior to the patch being applied and already has a much larger than expected batch size. I'm attaching one last patch for src/XF/Job/SearchRebuild.php to account for this.

If that doesn't work, you can delete the upgradeConversationSearchRebuild row from xf_job and rebuild the search index for conversations manually via the control panel or CLI. If you still encounter the error when/after trying that, please open a ticket with XF and server credentials and I will track it down.
 

Attachments

I think the issue may be that the queued search rebuild attempted to run prior to the patch being applied and already has a much larger than expected batch size. I'm attaching one last patch for src/XF/Job/SearchRebuild.php to account for this.

If that doesn't work, you can delete the upgradeConversationSearchRebuild row from xf_job and rebuild the search index for conversations manually via the control panel or CLI. If you still encounter the error when/after trying that, please open a ticket with XF and server credentials and I will track it down.

I installed the file this morning. Not a single error since. Thanks for your help.
 
Back
Top Bottom