How do I best resolve PHP Fatal Errors?

I have increased my php.ini setting for max_execution_time to 60 seconds and memory_limit to 512M (which is a ridiculously high setting), but I'm still getting fatal errors on both:

- PHP Fatal error: Maximum execution time of 60 seconds exceeded in
/home/causeint/public_html/wp-includes/capabilities.php on line 749

- PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to
allocate 52654 bytes) in /home/causeint/public_html/wp-includes/functions.php on line 251

My website hosting company says that I need to find out why those php scripts are blowing the limits because it would be ridiculous to set them any higher.

So what would be the best approach to seeing what's causing the errors for each script? Do I run a trace, or something similar (I've never run a php trace before ... the last time I did one was with COBOL and Fortran, and you can guess how long ago that was)?

Thanks ... Michael

  • PC
    • WPMU DEV Initiate

    Hello Michael,

    Greetings and thanks for posting on the forums.

    Can you kindly upload the attached file (after unzipping) to the root of your site so that the address is yoursite.com/phpinfo.php ?

    Once done, kindly provide the site link to me so that I can have a look at the php settings.

    PHP Fatal error: Maximum execution time of 60 seconds exceeded in
    /home/causeint/public_html/wp-includes/capabilities.php on line 749

    This is due to max_execution time and having it higher than 60 would not be ridiculous :slight_smile:

    I have it set at 240

    - PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to
    allocate 52654 bytes) in /home/causeint/public_html/wp-includes/functions.php on line 251

    512 M if they have set it up correctly should be good enough memory unless a plugin has become resource hungry.

    You can monitor that via : http://www.stumiller.me/how-to-monitor-and-reduce-wordpress-memory-usage-by-plugins/

    Cheers, PC

  • PC
    • WPMU DEV Initiate

    Hey Michael,

    There was no attachment with your message

    I realized that when I was having my coffee hours later. I searched for this thread and couldn't find it :slight_frown: My bad !

    The memory and execution time look good to me 640M is a good memory for a WordPress site.

    Are you still getting errors ?
    Did you monitor the plugin memory usage using the plugin on the link I gave above ?

    Please advise

    Cheers
    PC
    Sales &Support

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.