failed to allocate memory

Hi there! I have an app, that sometimes shows the above message at monrel.log and production.log. The app is running at production mode.

mongrel.log

** Writing PID file to log/mongrel.pid [FATAL] failed to allocate memory ** Daemonized, any open files are closed. Look at log/mongrel.pid and log/mongrel.log for info.

production.log ActionView::TemplateError (failed to allocate memory) on line #91 of app/views/time_line/_structure.html.erb:

What can it be?

Do you have any clue how can I configure mongrel to it not happen again?

Thanks