CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Fatal Memory Error Job Logs
Pages: [1]

Author Topic: Fatal Memory Error Job Logs  (Read 849 times)

bmccarthyhp

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.4.1
  • CMS version: Joomla 2.5.9
  • MySQL version: 5.5
  • PHP version: 5.3
Fatal Memory Error Job Logs
November 20, 2013, 10:17:18 am
Hi. I'm getting a fatal memory error when trying to access the scheduled job logs page at http://domain.com/administrator/index.php?option=com_civicrm&task=civicrm/admin/joblog&reset=1

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 80 bytes) in /srv/www/domain.org/public/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php on line 383

PHP.INI has memory_limit = 128M

My understanding is that allocating more than 128MB of memory isn't wise and there is likely a memory leak somewhere in the codebase. Is this a known bug and if so is there a workaround?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Fatal Memory Error Job Logs
November 21, 2013, 04:28:14 am
Quote from: bmccarthyhp on November 20, 2013, 10:17:18 am
My understanding is that allocating more than 128MB of memory isn't wise

That is not correct. 128 is not a magic number and you can have more.

Quote from: bmccarthyhp on November 20, 2013, 10:17:18 am
there is likely a memory leak somewhere in the codebase.

Or perhaps on the server.

Quote from: bmccarthyhp on November 20, 2013, 10:17:18 am
Is this a known bug and if so is there a workaround?

No, it's known to work fine. Try upping the RAM to 200MB.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

bmccarthyhp

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.4.1
  • CMS version: Joomla 2.5.9
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Fatal Memory Error Job Logs
November 21, 2013, 03:46:53 pm
Up'd the memory allocation to 256M, still errors out.

Is it possible the table being read in the log is simply too big? Is there a way to purge if so?

Where would the memory leak on the server originate? Running a stock Linode configuration, nothing crazy. Only app running on the server is CiviCRM. No performance issues are noted anywhere else except when this log is accessed.

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 74 bytes) in /srv/www/domain.com/public/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php on line 383

Also tried 512...

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 76 bytes) in /srv/www/domain.com/public/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php on line 383
« Last Edit: November 21, 2013, 03:49:42 pm by bmccarthyhp »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Fatal Memory Error Job Logs
November 21, 2013, 04:19:49 pm

the job log is here:

civicrm_job_log

can u see how bif the log is? maybe truncate it and/or delete most of the entries. I suspect that url is not doing things very smartly :(

if you can take a look and contribute a patch that would be very helpful

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

bmccarthyhp

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.4.1
  • CMS version: Joomla 2.5.9
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Fatal Memory Error Job Logs
November 21, 2013, 05:21:16 pm
The table had 260,000+ records. I trimmed it to < 1000 and the script runs. There should be a check in the SQL script, or PHP somewhere. Paging perhaps.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Fatal Memory Error Job Logs
November 21, 2013, 06:24:07 pm

great that it worked :)

can you take a look and improve the code so it does pagination etc. Please do submit a PR if you do the needed work

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Fatal Memory Error Job Logs

This forum was archived on 2017-11-26.