• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

1.1.1 Fatal Error - memory size exhausted

Ryan Kent

Well-known member
#1
Hello. I attempted to upgrade from 1.0.4 to 1.1.1 today and received the following error:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 17558 bytes) in /home/xxx/public_html/library/XenForo/Template/Compiler/Statement/Raw.php on line 13

The site is on a new dedicated server so there is plenty of memory available. I checked the php.ini file I had was overwritten during the upgrade process so I presume the settings are correct.

Any ideas?
 

Brogan

XenForo moderator
Staff member
#2
Try this from the FAQ: http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-282417

I am receiving a fatal error related to allowed memory size when performing certain functions, how can I increase or remove the limit?
To increase the limit, edit the library/config.php file and add the following:
PHP:
ini_set('memory_limit', 256 * 1024 * 1024);
Change the value (in megabytes) to suit. To remove the limit set the value to -1.
 

Ryan Kent

Well-known member
#3
Thank you Brogan. I made the recommended change.

Next, I tried to go to mysite/install and all I see is a blank white screen. I read the FAQ and see the following:

To continue with the upgrade, you will need to ensure the correct details are in library/config.php and replace the internal_data/install-lock.php file.
What does "replace" mean for the install-lock.php file? Delete it?
 

Brogan

XenForo moderator
Staff member
#4
Assuming you have used the upgrade .zip package, you shouldn't need to touch the install-lock.php file.

Is it missing?
 

Ryan Kent

Well-known member
#5
I used the upgrade.zip package. The install-lock.php file is present.

Any ideas on how I get the install going again? All I see is a white screen when I try to access my site or /admin.php or /install
 

Brogan

XenForo moderator
Staff member
#7
There's also a reference to a blank screen in the FAQ.

I see a blank page, is there any way of seeing more details to identify the cause of the problem?
A blank page is sometimes due to a suppressed error. Edit the library/config.php file and add the following:

ini_set('display_errors', true);
 

Ryan Kent

Well-known member
#8
I still see only a blank white screen.

My entire config.php file is (xxx replaces the actual values for username/pw/dbname):

<?php

$config['db']['host'] = 'localhost';
$config['db']['port'] = '3306';
$config['db']['username'] = 'xxx';
$config['db']['password'] = 'xxx';
$config['db']['dbname'] = 'xxx';
$config['debug'] = false;
// Temp setting to resolve timeout issue ini_set('max_execution_time', 0);
// Temp setting to resolve 30 second timeout issue with saving templates ini_set('max_execution_time', 0);

$config['superAdmins'] = '1';
ini_set('memory_limit', '256 * 1024 * 1024');
ini_set('display_errors', true);

Would uploading the upgrade package again possibly help?
 

Ryan Kent

Well-known member
#11
Looking back at the FAQ I noticed a line I could add to the .htaccess file:
php_value display_errors 1

I added the line and now see a 500 server error. Any thoughts of the root cause?

This issue arose immediately after the initial reported error at the start of this thread. I took no action in between except what is described in this thread.
 

Brogan

XenForo moderator
Staff member
#12
That seems to indicate a server related issue, but to rule out any problems, upload the entire upgrade .zip once more and try restarting Apache.
 

Jake Bunce

XenForo moderator
Staff member
#13
It helps to have a specific error. Check your server logs as they should contain the specific error.

I am voting for memory_limit. ini_set() doesn't always work. You can try increasing the limit using other means:

1) Add this to a .htaccess file on your server (only works on Apache servers):

Code:
php_value memory_limit -1
2) Edit the php.ini file on your server and restart Apache.
 

Jake Bunce

XenForo moderator
Staff member
#14
I added the line and now see a 500 server error. Any thoughts of the root cause?
ISE 500 error is not specific. Ideally your server logs will contain more information.

My guess would be file/folder permissions. Files are normally 644 and folders are 755, except for data and internal_data which should be 777. A lack or excess of permissions can result in a ISE 500 error on some servers.
 

Ryan Kent

Well-known member
#15
Well I uploaded the upgrade.zip file again, and then I restarted the Apache service. Issue remains.

The other site on the server works fine.

Any other ideas?
 

Ryan Kent

Well-known member
#17
From the apache log I see the most recent relevant line as:

99.89.112.40 - - [23/Dec/2011:08:52:37 -0500] "GET /install/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows NT 5.1; rv:8.0.1) Gecko/20100101 Firefox/8.0.1"

It is my IP and I am using FF 8.

I also added the suggested line to .htaccess. It had no effect. :(
 

Ryan Kent

Well-known member
#18
Should the bold bit be in quotes? Surely the memory limit should be set to a fixed value rather than a string containing a calculation?
Thanks for the input Steve. I am trusting the FAQ info is correct. If it is not, please let me know and I will try changing it.
 

Jake Bunce

XenForo moderator
Staff member
#19
Yeah use this to disable the memory_limit:

Code:
ini_set('memory_limit', -1);
Or if it's multiplication then remove the single quotes:

Code:
ini_set('memory_limit', 256 * 1024 * 1024);