Replace the gasket of intake manifold.
http://www.toyotanation.com/forum/132-9th-generation-2003-2008/369315-fixed-my-p0171-code-thanks-forum.html
http://www.toyotanation.com/forum/132-9th-generation-2003-2008/369315-fixed-my-p0171-code-thanks-forum.html