Please provide a lot more info.
What OS? What version of AE? How much RAM does your computer have?
Are you rendering using the Render Queue, or through Adobe Media Encoder?
What happens when the render stops? Do you get an error message? What does it say?
Or are you referring to RAM previewing as rendering?
By default, only the work area is rendered with the AE render queue. Hence, make sure the workarea is set to the entire duration of the comp.
This FAQ gives an overview of the different ways to render in After Effects:
If you are using the render cue then check the render settings and your work area. The default is to render only the work area. If your work area is set to one minute then you will only get one minute of video.
If you did something else we need details.