Title: Big database fatal problems
Last modified: August 18, 2016

---

# Big database fatal problems

 *  [Ally](https://wordpress.org/support/users/ally/)
 * (@ally)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/big-database-fatal-problems/)
 * Hi all,
 * I have already over 20000 entries in 9 categories in our company’s intranet database
   and many more are coming.
 * Our main page doesn’t display at all now despite the fact that i’ve included 
   ini_set(“memory_limit”,”999M”) in my wp-config.php. PHP version: 4.3.2
 * The categories pages having approx. 3000 entries are loading extremely slowly,
   those with over 3000-4000 entries aren’t loading at all giving me “Fatal error:
   Maximum execution time of 30 seconds exceeded in /wp/wp-includes/functions.php
   on line 1148”.
 * What can i do in this situation?
 * Thanks a lot in advance.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/big-database-fatal-problems/#post-243368)
 * Get a faster server 😛 or drop this somewhere (I think `wp-config.php` will do)
   to override PHP’s default execution time of 30 seconds:
 * `set_time_limit('120');`
 * See [http://www.php.net/manual/en/function.set-time-limit.php](http://www.php.net/manual/en/function.set-time-limit.php)
   for details.
 * And I think the slowness is a result of WordPress having to look through all 
   20k entries for the posts to display. (That’s just how databases work.) You might
   want to look into a caching plugin to cache the pages so they don’t have to be
   loaded from the database every time.
 * Perhaps others can shed some more light on how to speed up the whole thing for
   such a large number of entries.
 *  Thread Starter [Ally](https://wordpress.org/support/users/ally/)
 * (@ally)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/big-database-fatal-problems/#post-243380)
 * Thanks for your suggestions.
 * Unfortunately i can’t get a faster server. I’ve set up the timeout but the main
   page still didn’t loaded. My chief will kill me :-((
 * Maybe there is anything to limit entries number?
 *  [Joshua Sigar](https://wordpress.org/support/users/alphaoide/)
 * (@alphaoide)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/big-database-fatal-problems/#post-243386)
 * Go to admin panel Options -> Reading -> Show at most
 * Also there’s custom plugin [http://rephrase.net/days/05/03/custom-posts-per-page-plugin](http://rephrase.net/days/05/03/custom-posts-per-page-plugin)
   
   [http://mattread.com/archives/2005/03/custom-query-string-plugin/](http://mattread.com/archives/2005/03/custom-query-string-plugin/)
 *  Thread Starter [Ally](https://wordpress.org/support/users/ally/)
 * (@ally)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/big-database-fatal-problems/#post-243406)
 * I already tried both without much success.
    I made a little investigation and
   found that the line: $query_string = apply_filters(‘query_string’, $query_string);
   in wp-blog-header.php is the reason of slowdown but wp doesn’t work properly 
   without this line. Maybe there is some way to optimize the code? Could anybody
   help me? Thanks a lot.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Big database fatal problems’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [Ally](https://wordpress.org/support/users/ally/)
 * Last activity: [20 years, 9 months ago](https://wordpress.org/support/topic/big-database-fatal-problems/#post-243406)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
