I am having this problem where AE only renders 22+ seconds and then stops. It renders this segment beginning at the current spot in the timeline. The green line grows as the rendering happens but then anything past that 22+second timeframe goes blue and doesn't play any further, it loops the segment.
I have played around with the preferences. I started a new document and put a simple shape layer in for the attached video. It doesn't matter how long my video is, I only get 22+ seconds of preview.
You would normally render your project to an mp4 (for example) in Media Encoder or in the Render Queue, if you wanted to preview a section longer than a few seconds. Previews are rendered to RAM with no compression and once the RAM is full ( in your case < 30 secs ) it will not render anymore and will play what is rendered based on your preview window settings. Uncompressed frames do not take up less space just because the composition is simple, hence why your complicated and simple animations quit on you at more or less the same rendered duration.
If you really want to use previes to render longer sections alter the settings <Frame Rate> <Skip> and <Resolution> in the preview window in After Effects.
Best practice for longer renders is to select your comp. in the Project window, then using the upper menus select
<File> <Export> <Add to Adobe Media Encoder Render Queue>
Adobe Media Encoder will start up - maybe select MP4 and use the Youtube 1080p preset as a start until you get used to constructing you own encode presets.
Advantage of this is that Media Encoder will work in the background and you can carry on as normal in After Effects adding to other parts of your animation or even starting a completely new project.
After Effects is not a video editing app. It is designed to create visual effects and animations that you cannot create in an NLE like Premiere Pro. In the same way, a 3D app is not designed as an editing app, and even huge companies like Pixar and Disney do not edit their productions in the app used to create the shots.
The standard workflow, even for the giants, is to assign a team or a person to a shot or short sequence and have them develop that sequence. The workflow comes from the early days of animation. First is the Pencil Test, then comes Ink and Paint, then the frames are photographed one at a time, loaded into the projector, and given the final approval. Efficiently working with After Effects or any other animation software should follow the same workflow.
More than 90% of my comps are under seven seconds long because the average time between cuts in most films is under seven seconds. The only time I have a comp that is longer than a single shot is when I have to do a transition between shots that cannot be done in Premiere Pro or any other NLE we are using.
The workflow for a typical shot always follows the same workflow. The Pencil Test is when I add the elements to the scene, set up position, do the blocking or staging, and preview the motion of the shot without motion blur, final effects, color correction, and at reduced resolution and often skipping frames. I just want to know if everything in the design is going to work.
When the shot is working I'll start doing Ink and Paint. I pick hero frames to work on, add and finalize effects, check the frame at full resolution, and often send a frame or two to the client or the director that I'm working with to have them approve the shot.
Then the comp is rendered, and if needed, sent out for approval as an MP4. The rendered shot is added to the sequence and the final edit is done in an NLE. I don't mix sound in After Effects. I don't do the final master color grade in After Effects. I don't edit a movie in After Effects. Occasionally I will combine a few comps in one master comp to preview a scene in After Effects, but I never try and preview anything longer than a few seconds in AE, I render it if I want to see how it is working.
After Effects, and all other visual effects, animation, and compositing software is getting faster and better, but when ILM or Pixar, or Disney, with all their resources, are still basically using the Pencil Test, Ink and Paint, Render (send to the lab for processing), approve, then edit, add sound and color correct workflow, I'm sticking with the workflow.
One of these days I'll put together a tutorial or maybe interview a few of the folks I've worked with over the years on the subject.
If you are just starting out I strongly suggest that you familiarize yourself with the workspace, the UI, and some standard workflows by spending some time in the Learn workspace in AE, by checking out the User Guide, and by watching tutorials prepared by professionals. Be careful with tutorials prepared by enthusiasts that have found a recipe for some magic they have found because the explanations, and often the workflows can leave a lot to be desired. If you ever have problems with a tutorial, please post a link to the tutorial so we can help you.