I got a fatal error in existing code, when I debug deeper I found that it was coming from bellow line.
get_posts( array("posts_per_page"=>-1) );
Can anyone explain why is that and how to overcome it?
Error :
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /var/www/web0/html/blog/wp-includes/wp-db.php on line 2204