Video recording, too short

The motion detector only records 17 seconds at a time and anything after that is missed for a couple of minutes. For example, I had someone picking something up from my porch and I saw her pull up and saw her drive away but did not actually see her come to my door. How can I fix this so I see all of it? Thanks!