[wp-hackers] WP Memory usage
mark.wordpress at txfx.net
Mon May 29 08:34:20 GMT 2006
On May 28, 2006, at 5:53 PM, Francis Reyes wrote:
> Fatal error: Allowed memory size of 8388608 bytes exhausted (tried
> to allocate 200 bytes) in /usr/share/wordpress/wp-admin/admin-
> functions.php on line 1166
> Is it normal for people to exceed the 8MB allotment to PHP with WP
> 2.0.2? I've had to bump it up to 16MB. Maybe things like
> $template_data in 1166 should be unset after each foreach loop?
I've seen a few things knock WP over 8MB:
- more than about 2000 users (on /wp-admin/users.php)
- SOLUTION: make a paging/search systems for users... on the todo list.
- Textile2 on pages with 60+ posts
- SOLUTION: show fewer pages, don't use Textile2, debug Textile2 to
use less memory
What page did you get that error on?
It would be nice to stay under 8MB in more situations (especially WP
without any plugins!) Many people are stuck at 8 and can't change
it... so that's a big problem.
print_r($GLOBALS); (please, please secure this... <?php if
( current_user_can('manage_options') && $_GET['dump_globals'] )
print_r($GLOBALS); ?> ) will show what is being left open in the
global space... in functions that use big arrays, we should unset
whenever we can, to save memory.
More information about the wp-hackers