Fatal error: out of memory in wp-db.php (3 posts)

  1. ablester@colby.edu
    Posted 2 years ago #

    My WordPress site homepage came up with the error "Fatal error: Out of memory (allocated 26214400) (tried to allocate 1313199 bytes) in /localhost/wp-includes/wp-db.php on line 952".

    I am using 1&1 Linux Web hosting, and to solve this issue and get the site running again, I upgraded to a 1&1 package with more PHP memory. However, since the issue stems from wp-db.php, instead of a plugin, won't I get this error again after the posts eventually exceed the new memory limit?

    By the way, the code on line 952 of wp-db.php is as follows:

    	 * Escapes content by reference for insertion into the database, for security
    	 * @uses wpdb::_real_escape()
    	 * @since 2.3.0
    	 * @param string $string to escape
    	 * @return void
    	function escape_by_ref( &$string ) {
    		if ( ! is_float( $string ) )
    952 >>			$string = $this->_real_escape( $string );

    How can I prevent this Fatal Error from happening in the future? Do I need to disable certain plugins?

  2. WPyogi
    Forum Moderator
    Posted 2 years ago #

  3. ablester@colby.edu
    Posted 2 years ago #

    Thank you. I have already implemented this and I am interested in knowing the cause of the original problem (the Fatal Error on line 952). What does this line do exactly?

    Is there any way to make sure to prevent this problem in the future?

Topic Closed

This topic has been closed to new replies.

About this Topic