Flash message to disappear after 5 seconds?

It appears to me, that the process that put the flash message is dead after it e.g. creates a record. Maybe the send needs to go to different process?