You may want to post your message in the EOS camera section (where it is more likely to be seen.)
All DSLR cameras will stop recording after 29 minutes 59 seconds (basically it cannot record for 30 minutes) -- oddly enough... due to an international tariff on video cameras that does not apply to still cameras that can shoot video as long as they don't record more than 30 minutes of video. Incidentally, the tariff doesn't apply in the US but these cameras are sold internationally where the tariff does apply.
Also, the length of any single clip cannot exceed 4GB (regardless of card capacity) due to limits in the FAT32 filesystem (the 5D II does not support the exFAT filesystem format which gets around the 4GB filesize limit.)
Have you tried the camera with more than one memory card and does the same thing occur with all of them?
If it's only happening with one card, and the camera refuses to be turned off (red light remains on), then I suspect a problem with the memory card itself.
Do you regularly format the memory card in the camera? That "prepares" the card for use. Just be sure to remove any files from the card you want to keep, before formatting. (Note: if the memory card was formatted "in computer" or in another camera, it may have incorrect file format or extraneous data on it that's causing issues... re-format in your 5DII to be sure. In fact, I format all my memory cards before each use. That's probably more than is needed, but by making formatting always a part of my card swaps keeps me from forgetting to format a card.)
If the problem occurs with multiple memory cards and you are prepping and using them correctly, it's more likely a problem with the camera itself.
Yes, if this only occurs when shooting video, there are limits to how long you can shoot and how large a file you can make when shooting video. I think it also can shut down during a long session to prevent overheating.
It shouldn't happen at all when shooting still photos. If you take a whole bunch of images in a row at high speed, the camera may slow down or pause very briefly to clear the memory buffer. This is more likely to happen with cheaper, slow memory cards (give us specific info what memory cards you are using).
And, yes, there is a possibility the camera itself is malfunctioning. This is probably the least likely thing to occur. The only thing you can do yourself is remove the memory card and carefully inspect the pins in the memory card socket to see if any of them are bent. Also look at the memory card itself closely, at the holes where the pins insert, to see if there is any sign of damage. If you see any problems with either, it's a repair job.
It also might be a malfunction of electronic parts in the camera. However, it's still much more likely to be a time limit, file size limit built into the camera... or a slow or faulty memory card.
I use a couple dozen 8GB and 16GB Lexar and Sandisk memory cards (various speeds, the slowest are 400X or 30MB/sec) in my 5DII with no problems at all. But I only shoot stills with it, not video.
I did have a brand new 16GB 800X UDMA7 CompactFlash card go bad immediately after it's first use. It was filled once, downloaded once, and then locked up so that it couldn't be accessed at all. This occurred in a different camera, though... not my 5DII.
In ten+ years shooting digital exclusively and nearly 20 years shooting at least some digital, using a number of different cameras and whole bunch of different memory cards in that time, this was the only time I've had a "bad card". The only other problems I've had are corrupted files when I removed a card from the camera too quickly, while data was still being written to it (my fault, not the camera's... and it was an older model that was slower writing). And once I had some memory card reader connectivity issue that corrupted some files during download (removing a USB hub and connecting the reader directly solved that).
My point is...These things are pretty rare and often can be traced back to the user doing something wrong, as in my case, or a simply misunderstanding how the camera works. But, faults of cards and cameras can and do occasionally occur. I just hope it's something that's easily fixed, in your case.
12/05/2023: New firmware updates are available.
09/26/2023: New firmware updates are available.
08/18/2023: Canon EOS R5 C training series is released.
07/31/2023: New firmware updates are available.
05/18/2023: New firmware updates are available.
03/30/2023: New firmware updates are available.