I dont know how/why this happened. I was working on my site over the weekend and it was fine. When I came into the office this morning, I went to the site and got this:
Fatal error: Allowed memory size of 146800640 bytes exhausted (tried to allocate 57 bytes) in public_html/wp-includes/rewrite.php on line 1561
I searched and found some articles that offered solutions, but none of them worked for me. What I noticed that the file that is effected is usually different in each case. Mine happen to be the "rewrite.php" file. That might help. Other than that Im stumped.
I know the customer complaints are coming. Hopefully I get it fixed soon.
What would be causing this, so I know not to repeat it (if I did cause this). Can anyone help with this?
UPDATE
I defined the memory limit in the wp-config.php to 64M and the line reference in the error is now 836 instead of 1561.
This is the code for line 836:
if ( is_array( $uris ) ) {
foreach ( $uris as $uri => $pagename ) {
$this->add_rewrite_tag('%pagename%', "($uri)", 'pagename=');
$rewrite_rules = array_merge($rewrite_rules, $this->generate_rewrite_rules($page_structure, EP_PAGES));
}
}
UPDATE
I fixed the problem. The problem was somehow related to the permalink settings. Im using the CouponPress theme for wordpress. After increasing the memory limits, as suggested in most of the solutions (php.ini, wp-config.php, etc), I simply changed the permalinks to default and then back to my custom permalink. Everything seems to be back to normal. Why did this happen? I have no idea. All of sudden the error came up Monday morning and everyone was crazy (angry). I WOULD like to know what caused this, so I can prevent it in the future if I can. Thanks to everyone who helped me out with actual solutions.